Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
210
Saving Column Width at runtime
posted

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

  • 37774
    Suggested Answer
    posted

    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