Hi so I have been looking for a way to add different cell style to each cell of a list grid. Mainly being able to color each cell of a list grid with a different color? I have a grid full of data and I want to be able to set a specific grid cell with a specific color. Any help would be great Thanks!
Announcement
Collapse
No announcement yet.
X
-
You can specify CSS styles for each row by overriding either getCellCSSText(record, rowNumber, columnNumber) or getCellStyle(record, rowNumber, columnNumber) in the creation of your ListGrid. For example:
Code:isc.ListGrid.create({ ID:"styledListGrid", getCellCSSText: function(record, rowNumber, columnNumber) { /* * Will change the color of the text in rowNumber 3+ a different color */ if (rowNumber > 2) { return "color: #006699" } return ""; } });
Code:isc.ListGrid.create({ ID:"styledListGrid", getCellStyle: function(record, rowNumber, columnNumber) { /* * Will provide an alternate CSS style name to a record with id 2 */ if (record.id == 12) { return "table-row-highlight"; } /* * Else will return the default CSS style name */ return "cell"; } });
http://www.smartclient.com/docs/7.0r...d.getCellStyleLast edited by strandedmusician; 16 Feb 2010, 19:00.
-
I am having bit of same problem I want to show some rows( not only cell ) in bold based on the value of one cell Without affecting alternate row style. Like I have some columns in my grid same ItemName, ItemQty, deliveryTime, and status and I want to show whole row in bold when value of status is 'NEW'. I have override getCellCSSText method but it shows only status value in bold...
Can any body give any Idea how to show whole row in bold.Last edited by dilip_gupta; 16 Jun 2011, 01:30.
Comment
Comment