3.2.0

Myth of grid.refresh

Hi,

grid.refresh looks like a costly operation to me. It generates HTML out of grid's current state and renders that on the browser. Isn't it right?
Some scenarios -
1) I guess if new data is recieved from server via AW.XML.TABLE. request() for XML table based grid then a grid.refresh is not required as table.request on itself seems like doing the required HTML refresh
2) if sort is performed the again grid.refresh is not required.

Are my observations right??

In my project on the pages which have grid we are allowing the user to customise the grid (select column, reorder columns, no. of fixed columns) and are rerendering the grid following that.

The whole process of rerender involves
- clearing celldata and scroll models
- requesting fresh data for XML table based on selected and rordered columns
- setting the editability, coloring, formatting,alignment and calculations right for cells in header, rows and footers
- sorting the grid based for default sort column(s)

In the whole process I have observed that grid.refresh is not required at the end of all this, things work fine. Only piece which does not work is that footer cells are going unformatted. Why is this happening???
Also if I only do footer.refresh now instead of full grid.refresh, will it work and will it be more efficient.


Regards,
Girish
Girish Khemani
September 4,
Alex,

Can you please answer this.

Thanx
Girish Khemani
September 6,
Yes, grid refresh is an expensive operation as it consists of re-creating the grid html and replacing the current one with the updated version. When you know that the data has changed only in the small part of the grid (for example, a single cell) than it is more efficient to update only this part instead of the whole grid. Changes in the cell should trigger cell refresh automatically.
Alex (ActiveWidgets)
September 8,

This topic is archived.

See also:


Back to support forum