2012-05-22 50 views
0

在网格行更新发生后,我需要将焦点设置在网格的最后一行。任何人都可以帮我解决这个问题吗?如何将焦点设置在网格的最后一行

下面是我的GridView,

<asp:GridView ID="grdViewForComment" runat="server" OnRowDataBound="Row_DataBound" AutoGenerateColumns="false"> 
    <Columns> 
     <asp:TemplateField HeaderText="Advanced search"> 
      <ItemTemplate>               
      </ItemTemplate> 
     </asp:TemplateField> 
    </Columns> 
</asp:GridView> 
+0

感谢您的编辑abatishchev – user735647

回答

0

Check加入以下代码

grdViewForComment.Rows [19] .Focus(); // RowIndex在这里。

grdViewForComment.Rows.Count-1

相关问题