PDA

View Full Version : ExtJS 4.1.3: Tooltip for Grid Date Column. (Render config absent)



mazhar.shaikh
11 Nov 2013, 4:40 PM
Hi ,

I want to add a tooltip for my date column on the grid, but there is no render config on the column. For other columns I could use render config and following code works just fine.

metaData.tdAttr = 'data-qtip="' + Ext.String.htmlEncode(value) + '"';
return value;

But 4.1.3 doesnt have render config. Is there a way I can achieve this.

Following is the link for docs.
http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.grid.column.Date-method-render (http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.grid.column.Date-method-render)

Thanks

scottmartin
13 Nov 2013, 8:32 PM
This seems to work fine, unless I did not understand (testing in 4.1.1)



{
text: 'Last Updated',
width: 85,
sortable: true,
// renderer: Ext.util.Format.dateRenderer('m/d/Y'),

renderer: function (value, meta, record) {
value = Ext.util.Format.date(value, 'm/d/Y');
meta.tdAttr = 'data-qtip="' + value + '"';
return value;
},
dataIndex: 'lastChange'
}