This is a migrated thread and some comments may be shown as answers.

Rowformatting performance

2 Answers 112 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ralf
Top achievements
Rank 1
Ralf asked on 11 Sep 2010, 10:46 PM
Hi,

I'm using the gridview and sometimes get quite a lot of rows, like about 40.000 records.
there are about 18 columns and some need formatting based on the value in the cells.
this works fine either through the conditinal formatting or in the rowformatting/cellformatting event as described in some of your posts and tutorials.

so far so good.

However, two cells need some more action and I'm just wonderingwy the rowfomatting event is always fired, when you scroll or get the focus in the grid etc. Seems a little too much.

Shouldn't those events be fired when the value changes or is there an event which only fires when the value changed or when the value is being written in the cell? Like a rowcreated event?


Thanks

2 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 14 Sep 2010, 03:39 PM
Hi, 

I may be wrong, but I think that the rowformatting event is fired because when you scroll through the grid the new grid re-uses cells/rows and places the data into them, which gives the grid it's fast scrolling support. 
0
Robert
Top achievements
Rank 1
answered on 14 Sep 2010, 10:52 PM
Richard is correct about this. As you are scrolling through the grid, it maintains a list of rows/cells which it reuses and repopulates with data as you scroll through the grid. In doing so this increases performance and reduces the memory footprint of the RadGridView. The various formatting events allow you to style these rows as the data within them changes.
Tags
GridView
Asked by
Ralf
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Robert
Top achievements
Rank 1
Share this question
or