Home Forums WinForms controls Xceed Grid for WinForms how to get information about column width change event Reply To: how to get information about column width change event

User (Old forums)
Member
Post count: 23064

You can use the ResetWidth method to restore the width of the column to its original size. And you can define this value by using the DefaultWidth property.

If what you want is the last width, and not the original, then you will need to keep in memory the new value in the WidthChanged event every time it changes, and revert back to this value when you want, but don’t forget to unsubscribe to the event when you do the reverting, and subscribe to it again after.

To get the column in the event handler, use the sender. Simply cast it to a DataBoundColumn or a Column, i.e. :

( ( Column )sender).Width

Imported from legacy forums. Posted by André (had 2930 views)