/**
* @cfg {Function} renderer (Optional) A function used to generate HTML markup for a cell
* given the cell's data value. See {@link #setRenderer}. If not specified, the
- * default renderer uses the raw data value.
+ * default renderer returns the escaped data value. If an object is returned (bootstrap only)
+ * then it is treated as a Roo Component object instance, and it is rendered after the initial row is rendered
*/
/**
* @cfg {Roo.grid.GridEditor} editor (Optional) For grid editors - returns the grid editor
/**
* @cfg {String} align (Optional) Set the CSS text-align property of the column. Defaults to undefined.
*/
-
+ /**
+ * @cfg {String} valign (Optional) Set the CSS vertical-align property of the column (eg. middle, top, bottom etc). Defaults to undefined.
+ */
+ /**
+ * @cfg {String} cursor (Optional)
+ */
+ /**
+ * @cfg {String} tooltip (Optional)
+ */
+ /**
+ * @cfg {Number} xs (Optional)
+ */
+ /**
+ * @cfg {Number} sm (Optional)
+ */
+ /**
+ * @cfg {Number} md (Optional)
+ */
+ /**
+ * @cfg {Number} lg (Optional)
+ */
/**
* Returns the id of the column at the specified index.
* @param {Number} index The column index
* @param {String} dataIndex The column dataIndex
* @return {Object|Boolean} the column or false if not found
*/
- getIndexByDataIndex: function(dataIndex){
+ getColumnByDataIndex: function(dataIndex){
var index = this.findColumnIndex(dataIndex);
- return ci > -1 ? this.his.config[index] : false;
+ return index > -1 ? this.config[index] : false;
},
/**
return i;
}
}
+
+ return this.config.length;
},
/**
* @return {Number}
*/
getColumnWidth : function(col){
- return this.config[col].width || this.defaultWidth;
+ return this.config[col].width * 1 || this.defaultWidth;
},
/**
/**
* Returns true if the cell is editable.
* @param {Number} colIndex The column index
- * @param {Number} rowIndex The row index
+ * @param {Number} rowIndex The row index - this is nto actually used..?
* @return {Boolean}
*/
isCellEditable : function(colIndex, rowIndex){
}
});
-Roo.grid.ColumnModel.defaultRenderer = function(value){
+Roo.grid.ColumnModel.defaultRenderer = function(value)
+{
+ if(typeof value == "object") {
+ return value;
+ }
if(typeof value == "string" && value.length < 1){
return " ";
}
- return value;
+
+ return String.format("{0}", value);
};
// Alias for backwards compatibility