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:
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.
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:
After that Columns_Changed still fires, but only for ItemPropertyChanged.
Is there any other proper way of setting columns visibility dynamically?
ADAdministrator Syncfusion Team July 12, 2005 03:07 PM
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.
What are you doing differently to get the events unhooked?
IVIvanJuly 12, 2005 03:22 PM
I clear and repopulate Visible columns collection:
ADAdministrator Syncfusion Team July 12, 2005 07:11 PM
Instead of the this.gridGroupingControl1.TableDescriptor.Columns.Changed, try using this.gridGroupingControl1.TableDescriptor.VisibleColumns.Changed event.