Note that there are some explanatory texts on larger screens.

plurals
  1. POgridview gets scrolled on top
    primarykey
    data
    text
    <p>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.</p> <p>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.</p> <p>Any suggestions about this behavior.</p> <p><strong>Html Markup</strong></p> <pre><code>&lt;asp:UpdatePanel ID="UpdatePanel5" runat="server"&gt; &lt;ContentTemplate&gt; &lt;asp:Panel runat="server" ID="p1" Height="250px" Width="100%" ScrollBars="Both"&gt; &lt;asp:GridView ID="gv1" runat="server" CellPadding="3" AutoGenerateColumns="False" GridLines="Vertical" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" Width="108%"&gt; &lt;Columns&gt; &lt;asp:TemplateField HeaderStyle-Width="20px" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle"&gt; &lt;ItemTemplate&gt; &lt;asp:CheckBox ID="chkSelect" runat="server" AutoPostBack="true" OnCheckedChanged="checkBoxID_CheckedChanged"/&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText="OT Hours"&gt; &lt;ItemStyle Height="35px" Width="60px"/&gt; &lt;ItemTemplate&gt; &lt;asp:TextBox runat="server" ID="txtOThrs" Text= '&lt;%# Bind("othours") %&gt;' Width="60px" Font-Size="10px" ReadOnly="true" AutoPostBack="true"&gt;&lt;/asp:TextBox&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;asp:TemplateField HeaderText="OTAuth"&gt; &lt;ItemStyle Height="35px" Width="60px"/&gt; &lt;ItemTemplate&gt; &lt;asp:DropDownList runat="server" ID="ddlOTAuth" AutoPostBack="true" Font-Size="10px" Width="80px" Height="20px" Enabled="false" Text='&lt;%# Eval("OTAuthorized") %&gt;' &gt; &lt;asp:ListItem Value="Y"&gt;Yes&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="N"&gt;No&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;/asp:GridView&gt; &lt;/asp:Panel&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload