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
1390
Stop user from sorting on a specific column
posted

Hi,

I have a grid that can be sorted on any column except for one. It doesn't make sense to sort on it because it just contains images. Is there a way to keep the user from sorting on that column (and therefore not changing the previously sorted column)? Can I intercept the header click?

I'm using NetAdvantage 10.2

thanks

Mario

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Mario,

    It doesn't matter whether the sorting is external or not. What you do is set the SortIndicator on the column to Disabled.


            private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                UltraGridLayout layout = e.Layout;
                UltraGridBand band = layout.Bands[0];
                UltraGridOverride ov = layout.Override;

                ov.HeaderClickAction = HeaderClickAction.ExternalSortMulti;
                band.Columns["Image 1"].SortIndicator = SortIndicator.Disabled;
            }

Reply Children
No Data