I'm displaying a Datagrid like this and inviting the user to make a selection...
<div id="gradesDiv" style="overflow: auto; width: 380px; height: 300px">
<asp:DataGrid id="gradesGrid"
BorderWidth="1"
CellPadding="3"
AutoGenerateColumns="true"
runat="server">
<Columns>
<asp:ButtonColumn HeaderText="Select Item"
ButtonType="LinkButton"
Text="Select"
CommandName="Select">
</asp:ButtonColumn>
</Columns>
</asp:DataGrid>
</div>
(three other columns are added in the code-behind). But when the user makes a selection, a postback is performed and the scroll position lost. I'd like to be able to reset the div to display the selected item. Does anyone know how to do this?
I've tried adding
MaintainScrollPositionOnPostback="true"
to the asp, but it doesn't help. I attempted to maintain the scroll position in the codebehind but gradesDiv does not appear to be available to the code-behind.