i have asp:gridview wich contains check box as a column . i have put this gridview in a asp:panel with scroll bars. i have say 500 records in the grid view.
my issue is when, i click on the checkbox (say 200th record) it gets scrolled up to top. Reason here is i want to make some of the cells editable of the GridView and this part is working fine. but it gets scrolled up . then afterwards i have to scroll down again to make changes.
Any suggestions about this behavior.
Html Markup
<asp:UpdatePanel ID="UpdatePanel5" runat="server">
<ContentTemplate>
<asp:Panel runat="server" ID="p1" Height="250px" Width="100%" ScrollBars="Both">
<asp:GridView ID="gv1" runat="server" CellPadding="3" AutoGenerateColumns="False"
GridLines="Vertical" BackColor="White" BorderColor="#999999" BorderStyle="None"
BorderWidth="1px" Width="108%">
<Columns>
<asp:TemplateField HeaderStyle-Width="20px" HeaderStyle-HorizontalAlign="Center"
HeaderStyle-VerticalAlign="Middle">
<ItemTemplate>
<asp:CheckBox ID="chkSelect" runat="server" AutoPostBack="true"
OnCheckedChanged="checkBoxID_CheckedChanged"/>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="OT Hours">
<ItemStyle Height="35px" Width="60px"/>
<ItemTemplate>
<asp:TextBox runat="server" ID="txtOThrs" Text= '<%# Bind("othours") %>' Width="60px"
Font-Size="10px" ReadOnly="true" AutoPostBack="true"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="OTAuth">
<ItemStyle Height="35px" Width="60px"/>
<ItemTemplate>
<asp:DropDownList runat="server" ID="ddlOTAuth" AutoPostBack="true" Font-Size="10px"
Width="80px" Height="20px" Enabled="false" Text='<%# Eval("OTAuthorized") %>' >
<asp:ListItem Value="Y">Yes</asp:ListItem>
<asp:ListItem Value="N">No</asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
</asp:GridView>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>