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

4 posts, 0 answers
  1. Niloofar
    Niloofar  avatar
    24 posts
    Member since:
    Jan 2015

    Posted 31 Mar 2015 Link to this post

    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,
  2. Hristo
    Admin
    Hristo avatar
    716 posts

    Posted 03 Apr 2015 Link to this post

    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.

     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Niloofar
    Niloofar  avatar
    24 posts
    Member since:
    Jan 2015

    Posted 07 Apr 2015 in reply to Hristo Link to this post

    Thank you for your reply.

    Cheers,

    Niloofar

  5. Hristo
    Admin
    Hristo avatar
    716 posts

    Posted 09 Apr 2015 Link to this post

    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.

     
Back to Top