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
1290
Highlighting row
posted

Hi,

I have 2 uncertainties I hope someone could help me with

 

1) How do I highlight a row when I click on any cell of that particular row? Currently, it shows a cursor in that cell without highlighting the row. I have set the cells to read only.

2) How do I programmatically highlight a row by index?

Parents
  • 17259
    Verified Answer
    Offline posted

    1.

    grid.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.RowSelect

    2.

    If you want to activate the row (put the input focus, only one row)

    grid.Rows[index].Activate()

    If you want to select the row (you can select more than one)

    grid.Rows[index].Selected = true

    or

    grid.Selected.Rows.Add(row)

    or

    grid.Selected.Rows.AddRange(rows) (best if you want to select many rows together)

Reply Children
No Data