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
230
No selection in grid
posted

I'm using two grids (g1 and g2) bound to datatables (d1 and d2). I'm using the AfterRowActivate of g1 to fill d2 with data about the person in the selected row of g1.  I'm using alternating colors in g2, and I'm setting the backcolor of some g2 rows to pink (when they meet certain criteria). However, I do not want the user to be able to select rows in g2, nor do I want the backcolor to change to the selected color (blue).  Basically, I don't want any selectioin of rows, by the user or the grid after filling d2. G2 is a view only grid.

Any advice?

 

Later

Art

  • 3707
    posted

    Using the InitializeRow event you can achieve this by setting the Activation property of each row to disabled.

    private void ultraGrid1_InitializeRow(object sender, InitializeRowEventArgs e)
    {
       e.Row.Activation = Activation.Disabled;
    }