RadGridColumn.IsVisible

3 posts, 0 answers
  1. James
    James avatar
    17 posts
    Member since:
    Nov 2017

    Posted 14 Jan Link to this post

    I am trying to improve performance when I set GridViewColumn.IsVisible. Whenever I set that property, the ViewCellFormatting event is invoked by the grid.

    I need to make several column invisible at the same time. I tried using BeginUpdate..EndUpdate and that doesn't seem to have an effect. I would like to set several columns invisible by invoking the GridViewColumn.IsVisible property without the ViewCellFormatting event from being raised for each one.

    Thanks in advance,

    Jim

  2. James
    James avatar
    17 posts
    Member since:
    Nov 2017

    Posted 14 Jan in reply to James Link to this post

    nevermind...I just unsubscribed from the event, changed visibility, and resubscribed to the event. Problem solved.
  3. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3624 posts

    Posted 15 Jan Link to this post

    Hello, Jim,    


    When you execute a piece of code in a BeginUpdate/EndUpdate block, only one refresh operation will be performed after calling the EndUpdate method. Hence, if you call BeginUpdate and then manipulate the visibility of several columns, it is not expected the CellFormatting event to be fired until you call the EndUpdate method. Then, it is expected any formatting events to be fired. 

    I am glad that you have found a suitable solution for your case. Unsubscribing from this event while you execute any code snippets is also a suitable approach.

    However, if you are still experiencing any further difficulties, feel free to submit a support ticket where you can provide a sample project demonstrating the undesired behavior. Thus, we would be able to investigate the precise case and think about a suitable solution.

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

     

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top