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
85
Don't know how to select rows in UltraGrid
posted

Hi,

When I click on a row in my grid ( in any column ) the following code returns a Count of 0

if (myGrid.Selected.Rows.Count == 0)

{ ... }

but when I change the property/extend the first cell and click on the little box on the left, row gets selected just fine and code above returns a Count = 1

How can select row by clicking in any column instead of the little box provided by the grid?  Thank You

 

Parents
No Data
Reply
  • 975
    posted

     Use ActiveRow Instead of Selected.Rows. Because Selected Rows can be more than one but ActiveRow will be one per grid.

    if(myGrid.ActiveRow !=null)

    {

        myGrid.ActiveRow.Selected = true;

     Or use

    CellClickAction property.


Children