We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Identifying colunm in Syncfusion::Windows::Forms::Grid::Grouping::GridTableControlResizingColumnsEventHandler

I am trying to track changes to column widths in a GridGroupingControl at any of 5 nested tables. The Syncfusion::Windows::Forms::Grid::Grouping::GridTableControlResizingColumnsEventHandler traps the event and I can use Reason to know that the column is changing width (MouseUp, DoublClick and RestDefault) and I can use TapleControl->TableDescriptor->Name to know which table the user is in but I cannot figure out how to identify the column that is being resized.

Thanks!
WJL

3 Replies

AD Administrator Syncfusion Team August 18, 2006 05:41 AM UTC

Hi Bill,

Please try this code snippet to get the column information from GridTableControlResizingColumnsEventHandler. Here is a code snippet.

int index = e.TableControl.TableDescriptor.ColIndexToField(e.Inner.Columns.Left);
Console.WriteLine("VisibleCoulmn Collection => Column Name : " + e.TableControl.TableDescriptor.VisibleColumns[index].Name );
Console.WriteLine("Column Collection => Column Name : " + e.TableControl.TableDescriptor.Columns[index].Name );

Let me know if this helps.
Best Regards,
Haneef


BL Bill Langlais August 18, 2006 01:17 PM UTC

Hi,

That worked fine. It looks like the one I want to use is VisableColumn because that take s into consideration any hidden column os if columns have been repositioned. Is there a reason you would use the other Column?


AD Administrator Syncfusion Team August 21, 2006 09:45 AM UTC

Hi Bill,

By default all the entries in the Column collection will be there in the VisibleColumn collection too, but when you want to hide some columns you can remove it from the visiblecolumn collection.

Thanks,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon