PDA

View Full Version : Custom Grid Cells



martskins
8 Dec 2013, 2:18 PM
Say I have a grid and I want to have a bigger cells in it, with a title, subtitle and details and maybe even an image too.

Is this possible?

Has anybody tried this?

Thanks in advance

Farish
9 Dec 2013, 12:28 AM
may be this helps:

http://docs.sencha.com/extjs/4.2.0/#/api/Ext.grid.View-method-getRowClass

you can change the class to adjust the height etc. Take a look at this thread:
http://www.sencha.com/forum/showthread.php?136565-How-to-set-the-row-height-for-grid

Also look at the renderer function for grid column. you can return HTML e.g.


{ text: 'Name', dataIndex: 'name',
renderer: function(val)
{
return "<span style='padding:15px;'>" + val + "</span>";
}
}

where val is the value of the data in that cell and you can use css styling.

martskins
9 Dec 2013, 5:08 AM
That got me in the right direction! Thanks a lot!