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 .............
}
Hello,
I just wanted to know if you were able to solve your issue based on these suggestions or you still need help? Just let me know.
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.
I tried this and it always works fine for me so I attached my sample to this post for you. Please review it and feel free to let me know if I misunderstood, If so please if possible attach a sample project reproducing the issue through the 'Options' tab above when you are writing you post and then 'Add/Update' and I will be happy to take a look at it. Please let me know if you have any other questions.