PDA

View Full Version : Can I customize the grid display?



tkm
1 Feb 2008, 9:54 AM
Hello mates,
Can I customize the grid display? Like, I show 3 rows than I have 1 bold heading and 3 more rows under that? Or maybe blank rows in between those 2 chunks for visibility issue. Are this done by Grouping and some combination of CSS? Thank you.

para
1 Feb 2008, 10:13 AM
You can use Grouping for that if the groups make sense.

For mine I had to implement my own renderer which renders certain values differently. Essentially, if the value for the cell starts with a '_', it strips off the '_' and adds a class.



grid.getView().getRowClass = function(record, rowIndex, p, ds) {
var val = record.data.value;
if(val && val.length > 0 && val.charAt(0) == "_") {
return 'x-unselectable x-panel-header x-panel-header-noborder x-panel-header-text MyCustomClass';
}
};