Super simple setup:
One webgrid attached to an ObjectDataSource, which retrieves the data via Linq from a database. I enabled AJAX for the webgrid.
Now I want the user to select a row, click a button and work with the selected row on Postback. This works fine, as long as the user downt scroll down. When the user does scroll down and new rows are loaded via AJAX and the user selects one of those rows, the returned row on postback is wrong. It is always the last row in the table before the AJAX async callback.
Is use myGrid.DisplayLayout.ActiveRow to retrieve the selected row.
Any tips on what I am doing wrong? Again: if the user selects one of the first rows, it works just fine.....
This seems to be a bug. Even the online demo under http://samples.infragistics.com/2008.1/webfeaturebrowser/default.htm doesnt seem to work. When you select a row in the AJAX example grid the customer is not selected....
Oh man. Now I have to code paging again. this REALLY sucks bigtime. I really wonder why I bought the Infragistics controls.....
Isnt this fraud? Selling stuff that obviously doesnt work?
I feel your pain. Literally. I've been feeling this pain for about two months. Getting very frustrated...bug after bug after bug with the webgrid. I had really good luck with the Win version of their controls...not so much with the web.
But, to your question, I had the exact same problem. And I worked with support...there isn't a solution. They said something to the affect "not all features of the grid are supported in Ajax mode". Anyway, I solved the problem by putting my action buttons right in the grid. So instead of selecting a row and clicking "do something"...I put a "Do Something" button on every row. The event fired by that button always contains the correct row. Not sure if this technique will help you or not.
-Walter