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
1355
Disabling sorting on selected columns
posted

Hi, 

 I would like disable sorting on a specific columns ( i hv grid level settings as sortMulti) and fire some other methods based on columns header selection/Mouse over .?

 

Thanks,

Valliappan

  • 469350
    Offline posted

    Hi,

    To disable the sorting, you can set the SortIndicator on the column to Disabled.

    To determine if the mouse is over a column header, you will need to use the UIElements.


            private void ultraGrid1_MouseDown(object sender, MouseEventArgs e)
            {
                UltraGrid grid = (UltraGrid)sender;
                UIElement element = grid.DisplayLayout.UIElement.LastElementEntered;
                Infragistics.Win.UltraWinGrid.ColumnHeader columnHeader = element.GetContext(typeof(Infragistics.Win.UltraWinGrid.ColumnHeader)) as Infragistics.Win.UltraWinGrid.ColumnHeader;

                if (columnHeader != null)
                    Debug.WriteLine(columnHeader.Column.Key);
            }