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

BeginUpdate() and endUpdate() vs. refresh()

3 Answers 1305 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Niloofar
Top achievements
Rank 1
Niloofar asked on 31 Mar 2015, 05:23 PM
hello,
I have a grid which i wanted to group by columns (there were cell formatting on cell elements)but after removing the grouping condition , there was a problem with the index of cell elements and formatting of cell elements got messed up.

I used me.beginupdate() and me.endupdate() in a sub handling me.groupbychnaged.  grid seems to be working fine. I tried me.refresh() and it is not working.

I am wondering what is the difference between these two methods. I thought they both do updating/refreshing grid

cheers,

3 Answers, 1 is accepted

Sort by
1
Hristo
Telerik team
answered on 03 Apr 2015, 12:26 PM
Hi Niloofar,

Thank you for writing.

The BeginUpdate and EndUpdate methods are intended to optimize the performance of RadGridView. It is recommended when you perform an operation like adding multiple rows or changing multiple cell values to put this logic between calls to the BeginUpdate and EndUpdate methods. In the above described scenario the grid layout would be refreshed only once, right after calling EndUpdate method.

The Refresh method on the other hand basically invalidates the control layout and forces it to redraw itself.
I can recommend the following articles as they provide additional information on formatting the cells and the column grouping: Cell Formatting, Grouping

May I ask you to send us a sample project correctly depicting your scenario. This way we could check how you are performing the formatting and confirm the approach or suggest a different one.

I hope this information is useful. Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Niloofar
Top achievements
Rank 1
answered on 07 Apr 2015, 12:14 PM

Thank you for your reply.

Cheers,

Niloofar

0
Hristo
Telerik team
answered on 09 Apr 2015, 12:54 PM
Hi Niloofar,

I am glad that you find the information useful. 

Should you have further questions please do not hesitate to write back.

Regards,
Hristo Merdjanov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
GridView
Asked by
Niloofar
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Niloofar
Top achievements
Rank 1
Share this question
or