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?
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?
Hey there. Thank you for the response.
Yes, I had a method that was causing a databind() on the grid and it was wiping out the SelectedRow. Oddly enough, the method was being called in the DEV environment also and wasnt killing the SelectedRow. Strange.
Thanks again,
Rob