The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
I''m using the GGC.
The column descriptors and the datasource are populated dynamically and could be changed at run-time.
My goal is to catch an event when users reorder columns by Drag&Drop.
I''ve tried the approached, described in:
http://www.syncfusion.com/Support/user/uploads/GGC_MoveCOlumns_8e767f4c.zip
But the Columns_Changed fires only once.
After I change the Model and/or datasource it will not fire.
I also tried to subcribe to this event after I change the model and datasource - still the same.
Any suggestions?
Thank you.
It seems that I''ve found the source of the problem:
After I populate the columns, I set the visibility of the columns in the following way:
gridGroupingControl1.TableDescriptor.VisibleColumns.Clear();
for(int i=0;....)
{
if(some_condition)
gridGroupingControl1.VisibleColumns.Add(proper_name);
}
After that Columns_Changed still fires, but only for ItemPropertyChanged.
Is there any other proper way of setting columns visibility dynamically?
Thank you
ADAdministrator Syncfusion Team July 12, 2005 08:07 PM UTC
I tried to see a problem in the sample. I added a button that creates a new datasource for the the grid. In this sample, the events still are raised for me.
http://www.syncfusion.com/Support/user/uploads/GGC_MoveCOlumns_b223e272.zip
What are you doing differently to get the events unhooked?
IVIvanJuly 12, 2005 08:22 PM UTC
I clear and repopulate Visible columns collection:
gridGroupingControl1.TableDescriptor.VisibleColumns.Clear();
gridGroupingControl1.TableDescriptor.VisibleColumns.Add();
ADAdministrator Syncfusion Team July 13, 2005 12:11 AM UTC
Instead of the this.gridGroupingControl1.TableDescriptor.Columns.Changed, try using this.gridGroupingControl1.TableDescriptor.VisibleColumns.Changed event.
http://www.syncfusion.com/Support/user/uploads/GGC_MoveCOlumns_e10df834.zip