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.....
Hello,
> I use myGrid.DisplayLayout.ActiveRow to retrieve the selected row.
Did you try this in C#, to retrieve the selected row when PostBack?
UltraGridRow selectedRow = myGrid.DisplayLayout.SelectedRows[0];
if (selectedRow != null) { ... }
Have you also searched the old forum, it' s full of good ideas:
http://forums.archive.infragistics.com/readgroup?group=infragistics.products.netadvantage.aspnet.webgrid