View Full Version : adding new records into an existing store will clear previous style customizations

17 Mar 2010, 8:37 AM

I have several records loaded remotely into the Grid, and the background color of certain cells that the user has clicked is changed to red.

After adding new records retrieved from remote server into the grid by calling the following method:

params: par ,//parameters sent to remote server

the grid is refreshed and all of the pervious style customizations are removed. The grid shows the original default style.

However, calling 'store.insert(index, records)' will not clear the grid's existing style settings.

in my case, I have to use store.load({add;true}), because the new records are retrieved remotely.

could anyone have some experience to deal with this?


17 Mar 2010, 8:42 AM
the goal I want to achieve is to keep all existing style customizations even after new records are added into the grid.

17 Mar 2010, 8:44 AM
What, you have modified the inline styling of cells post render?

That's a Bad Idea

17 Mar 2010, 8:53 AM
for the cell clicked by the user, I do the following to customize the cell's background

cell.className = cell.className +' grid-cell-highlight';//grid-cell-highlight will set the red background

the reason why I want to do so is that, once the user clicks a cell, the data in this cell will be copied to a form(more actions are done for this event), and the visual change of this cell will help the user to memorize what cells he/she has clicked or say, performed the actions.