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
85
Resize all selected columns by dragging the one column on the right edge.
posted

For our project, We are using "NetAdvantage for .NET 2007 Volume 1 CLR 2.0".

Required Output:

Resize all selected columns by dragging the one column on the right edge.

Description:

In the Winforms, we are using the UltraWingrid. I am selecting the multiple columns in the grid and try to resize the columns by dragging right end of the lastly selected column with mouse operation.

But its resizing only the last selected column and other selected columns remains as it is.

Could you pls anyone help for me. I have tried with available properties but it is not working fine as expected.

Is this feature available in the infragistics wingrid. If yes , which properties i need to set to get the required output.

(For your information: This type of formatting is available in the microsoft excel sheet, where it will resize all the selected columns on increasing/decreasing one column width)

Thanks and Regards,

Nagarjun.T

Parents
No Data
Reply
  • 5520
    Suggested Answer
    posted

     private void UltraGrid_AfterColPosChanged(object sender, AfterColPosChangedEventArgs e)
            {
                try
                {
                    if (UltraGrid.Selected.Columns.Count > 1 && e.PosChanged == PosChanged.Sized)
                        foreach (Infragistics.Win.UltraWinGrid.ColumnHeader uColumnHeader in UltraGrid.Selected.Columns)
                        {
                            UltraGrid.AfterColPosChanged -= UltraGrid_AfterColPosChanged;
                            uColumnHeader.Column.Width = e.ColumnHeaders[0].Column.Width;
                            UltraGrid.AfterColPosChanged += UltraGrid_AfterColPosChanged;
                        }
                }

     

Children
No Data