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

RadGridColumn.IsVisible

2 Answers 128 Views
GridView
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
Veteran
James asked on 14 Jan 2020, 06:23 PM

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 Answers, 1 is accepted

Sort by
0
James
Top achievements
Rank 1
Veteran
answered on 14 Jan 2020, 06:35 PM
nevermind...I just unsubscribed from the event, changed visibility, and resubscribed to the event. Problem solved.
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 15 Jan 2020, 01:54 PM

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.
Tags
GridView
Asked by
James
Top achievements
Rank 1
Veteran
Answers by
James
Top achievements
Rank 1
Veteran
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or