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
40
grid.SelectedRows.Count property has a value of 0
posted

I'm having a problem with an ultrawebgrid where when a row is selected the grid.SelectedRows.Count property has a value of 0.

The problem is that the problem only exists in 2 of 3 of my development environments.  When I run this from my DEV web server, or in debug against my DEV database and servers, it works fine....grid.SelectedRows.Count == 1 and off we go processing the selected record.  But in my BCD and TST environments, running either from my web server or in debug from visual studio, I get a grid.SelectedRows.Count == 0 when selecting from a grid.  Exact same code in all environments.

Would a change in the data in the datasource datatable affect the event not populating it correctly?

Parents
No Data
Reply
  • 28464
    posted

    Hello Robert,

    Very hard to tell, since you have identical setups, so I really do not know what could have caused this. I've seen a similar forum post recently, where a customer was getting SelectedRows.Count = 0 even when there were rows selected, and the reason for this was that the grid rebinding after postback occurred prior to his check (rebinding the grid clears SelectedRows collection).

    So does this provide some clue (I hope so...)... something along the lines of rebind occuring due to change of data priro to calling SelectedRows.Count on some of your machines? 

Children