PDA

View Full Version : Blinking of grid row upon grid refresh and rowdata change



nickydavid
20 Oct 2008, 10:29 PM
Hello All,

I am trying to implement a grid which has a particular number of rows. This grid refreshes every 10 secs. When the grid refreshes, it changes the contents of any one of the rows. Is it possible to have that particular row to blink to visually indicate and emphasize the change of text? I tried the following but this is not exactly what I want:

grid.addListener(Events.CellClick, new Listener<GridEvent>()
{
public void handleEvent(GridEvent ge) {
El el=ge.getTargetEl();
el.blink(new FxConfig(1000));
}
});

Would appreciate any help.
Thanks,
Nicky

fjulbe
20 Oct 2008, 10:59 PM
Hi Nicky,
I'm sorry to tell you I cannot help you bu now, but maybe you can help me.

How do you refresh the contents of the grid every x seconds. I'm having a lot of trouble trying to update the contents of a grid.

Cheers,
Cesc

nickydavid
22 Oct 2008, 12:10 AM
Cesc,
I just reload the store that populates the grid. Meaning I do a grid.removeAll() and then add the updatedstore again.

All,
I was able to solve this issue. The source for the grid was an arraylist. I could find the index of the changed field in the arraylist and then get the row at that index using the gridview. Once I got the row element, I could call the blink on it.

mjlecomte
22 Oct 2008, 5:46 AM
Hi Nicky,
I'm sorry to tell you I cannot help you bu now, but maybe you can help me.

How do you refresh the contents of the grid every x seconds. I'm having a lot of trouble trying to update the contents of a grid.

Cheers,
Cesc

I don't know how different GWT is, but if you consult the ExtJS FAQs on Grids there's a solution in there for autorefreshing.