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
4695
check selected row index
posted

Dear all,

I have below code and when I select the row in the ultragrid, selected.rows.count==0??

if (this.ultraGrid1.Selected.Rows[0].Index >= 0)  // throw exception
            {  ........Cannot  run here .............

           }

 

Parents
  • 469350
    Offline posted

    If this code raises an exception and the Selected.Rows.count is 0, it means there are no selected rows in the grid.

    My guess is that you have no selected rows, but you are mistaking the ActiveRow for a selected row. By default, the ActiveRow looks the same as a selected row. So you might want to check the ActiveRow and use that if the Selected.Rows.Count is 0.

Reply Children
No Data