wsturdev
asked on
Freeze Scroll of DataGrid in Web App
I have a web app with a datagrid that has a vertical scrollbar and no pager. Each row of the datagrid has a couple of read only text boxes and a radiobuttonlist (see attached code). AutoPostback is set to False. The user can scroll to any row in the datagrid and click one of the radiobuttons. When ready, he can click a Save button.
If I set AutoPostBack to True, changes can be saved right away. But, if the user is on one of the rows beyond what is visible upon arriving at the page, this causes the DataGrid to reset itself to the top row. And the user has to scroll down again to get to another row not initially visible, a fact that is very annoying to the user, and makes for a bad user experience.
What code can I use to "freeze" the vertical scroll of the datagrid so that it appears to the user that nothing has happened in the background?
If I set AutoPostBack to True, changes can be saved right away. But, if the user is on one of the rows beyond what is visible upon arriving at the page, this causes the DataGrid to reset itself to the top row. And the user has to scroll down again to get to another row not initially visible, a fact that is very annoying to the user, and makes for a bad user experience.
What code can I use to "freeze" the vertical scroll of the datagrid so that it appears to the user that nothing has happened in the background?
<asp:RadioButtonList ID="Raw_Score" Width="205px" AutoPostBack="true" OnSelectedIndexChanged="SelectedQuestionsCnt" Font-Size="9pt" SelectedIndex='<%# DataBinder.Eval(Container, "DataItem.Raw_Score") %>'
runat="server" RepeatDirection="Horizontal">
<asp:ListItem Enabled="false" Value="0" Text=" "></asp:ListItem>
<asp:ListItem Value="1" Text=" "></asp:ListItem>
<asp:ListItem Value="2" Text=" "></asp:ListItem>
<asp:ListItem Value="3" Text=" "></asp:ListItem>
<asp:ListItem Value="4" Text=" "></asp:ListItem>
<asp:ListItem Value="5" Text=" "></asp:ListItem>
<asp:ListItem Value="6" Text=""></asp:ListItem>
</asp:RadioButtonList>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.