B
Bogdan
Hi,
I have a gridview with ObjectDataSource attached and page/sort enabled. A
user can select a row on a given page. The app 'remembers' data item linked
to the selected row. The row is rendered as selected only if a user
navigates to the page containing the selected data. A user can navigate to
the selected data item's detail page and then come back to the grid view.
Although the 'coming back' is not a page postback, the corresponding row
will still be selected and a proper page displayed.
This is relatively easy to do - I simply handle the Selected event of the
data source object and based on its table content I calculate current page
index and selected index (i.e. if the selected data happens to be on the
current page).
Unfortunately the above approach does not work when sorting is involved.
The sort occurs after the Selected event so I have no way of determining on
what page the selected data item is.
Is there another way I could accomplish the above? Is there an event fired
_after_ the ObjectDataSource sort operation is performed?
Thanks,
Bogdan
I have a gridview with ObjectDataSource attached and page/sort enabled. A
user can select a row on a given page. The app 'remembers' data item linked
to the selected row. The row is rendered as selected only if a user
navigates to the page containing the selected data. A user can navigate to
the selected data item's detail page and then come back to the grid view.
Although the 'coming back' is not a page postback, the corresponding row
will still be selected and a proper page displayed.
This is relatively easy to do - I simply handle the Selected event of the
data source object and based on its table content I calculate current page
index and selected index (i.e. if the selected data happens to be on the
current page).
Unfortunately the above approach does not work when sorting is involved.
The sort occurs after the Selected event so I have no way of determining on
what page the selected data item is.
Is there another way I could accomplish the above? Is there an event fired
_after_ the ObjectDataSource sort operation is performed?
Thanks,
Bogdan