[Solved]change column color of single row(grid column names row)
i want to know how can i change color of single column of first row of grid(row displaying names of columns) since i want to change color of column according 2 condition is its mandatory or not....& this for mandatory column only & that to for first row only.
Plus moreover, i would like to know how can i delete particular row in grid & as soon as i delete that row there must be addition of one row with default values of columns...since i want to make 50 rows in grid consistent at any time...
1. For changing the look (or content) of a row/cell see the renderer config option in ColumnModel and/or the getRowClass() method in GridView. If you do a search in the forums for these you'll see plenty of examples.
2. For responding to a row delete, see the rowremoved event in GridView or the remove event in Store.
thnx 4 quick reply
thnx but that CSS thing will be applied to all columns right?i mean for data below those columns??
i want it only for header column
& also as mentioned by you there are some fire event but where is method/function which allows to grid row..
Just confirm for me:
1. You want to change the color of the first cell in the Header? Take a look at getHeaderCell() in GridView.
2. You want to know how to delete a row? Take a look at remove() in Store. (Assuming you are using the RowSelectionModel, when a delete is requested, get the current selection, call the grid's store's remove(), call the grid's store's add() - to keep your 50 rows - and then refresh the grid's view.)