J
Jay Pondy
I have a Gridview with Paging and Sorting turned on that is bound to an
ObjectDataSource which in turn is bound to a StronglyTyped datatable.
After I add a new row to my Stronglye Typed datatable and call
GridView.DataBind how can I select the row in the GridView? (And I don't mean
set the Grid.PageIndex and Grid.SelectedIndex but rather how can I determine
where in the SORTED result set the new row is.)
In the DataSourceObject Selected event I can cast the ReturnValue to my
strongly typed datatable BUT it is not yet sorted. Tracing the code shows
that the GridViews Sorting and Sorted Events have already fired so I am a bit
confused as to what is happening when. Somehow I need to set the GridViews
PageIndex and SelectedIndex based on where the new row is in the SORTED
result set.
Seems like I'm close but after two days I'm feeling a bit frustrated and
wondering again if this data binding stuff is worth the trouble. It sure
seems like ASP 2.0 is very close to making it worth the trouble so onward I
shall press.
ObjectDataSource which in turn is bound to a StronglyTyped datatable.
After I add a new row to my Stronglye Typed datatable and call
GridView.DataBind how can I select the row in the GridView? (And I don't mean
set the Grid.PageIndex and Grid.SelectedIndex but rather how can I determine
where in the SORTED result set the new row is.)
In the DataSourceObject Selected event I can cast the ReturnValue to my
strongly typed datatable BUT it is not yet sorted. Tracing the code shows
that the GridViews Sorting and Sorted Events have already fired so I am a bit
confused as to what is happening when. Somehow I need to set the GridViews
PageIndex and SelectedIndex based on where the new row is in the SORTED
result set.
Seems like I'm close but after two days I'm feeling a bit frustrated and
wondering again if this data binding stuff is worth the trouble. It sure
seems like ASP 2.0 is very close to making it worth the trouble so onward I
shall press.