Hi If a user changes a particluar column width, I want to save this new value. How do I find which column the user rezised? Regards JensB
You can use the AfterColPosChanged event to get the new width of the column:
private void ultraGrid1_AfterColPosChanged(object sender, Infragistics.Win.UltraWinGrid.AfterColPosChangedEventArgs e){ if (e.PosChanged == Infragistics.Win.UltraWinGrid.PosChanged.Sized) { UltraGridColumn col = e.ColumnHeaders[0].Column; int newWidth = col.Width; // Do things with the width... }}
-Matt
<[Infragistics] Matt Snyder> wrote in message news:108311@forums.infragistics.com... You can use the AfterColPosChanged event to get the new width of the column: private void ultraGrid1_AfterColPosChanged(object sender, Infragistics.Win.UltraWinGrid.AfterColPosChangedEventArgs e){ if (e.PosChanged == Infragistics.Win.UltraWinGrid.PosChanged.Sized) { UltraGridColumn col = e.ColumnHeaders[0].Column; int newWidth = col.Width; // Do things with the width... }} -Matt http://community.infragistics.com/forums/p/28025/108311.aspx#108311
You might want to consider using the Save and Load methods on the grid's DisplayLayout, rather than saving indivisual column widths yourself.
Hi Mike,
I have a similar need. Our users are now requesting that we save any and all their column width changes along with sort orders that may been set by them. What is the best way to accomplish this?
Thanks.
Use the Save and Load methods on the grid's DisplayLayout.