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
Disable selection of row on disabled rows
posted

Hi,

I'm using version 10.2. I have a grid where some of the rows need to be disabled because we don't want the user to be able to select those rows, but still want them to see the information. Is there a property that turns off selection (highlighting) of the disabled row or an event I can programmatically do this?

thanks

Mario

  • 469350
    Verified Answer
    Offline posted

    Hi Mario,

    You can do something like this:


            private void ultraGrid1_BeforeSelectChange(object sender, BeforeSelectChangeEventArgs e)
            {
                foreach (UltraGridRow row in e.NewSelections.Rows)
                {
                    if (row.Activation == Activation.Disabled)
                    {
                        e.Cancel = true;
                        break;
                    }
                }
            }