It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center




9年前关闭。




如何在gridview中动态添加页脚行。与文本框..请给任何想法...

最佳答案

由于在网格 View IMO中只能有一个页脚行,因此最好通过将网格 View 的ShowFooter属性设置为true来添加页脚行。设置
FooterStyle属性在这里可能会有所帮助。

进入编程部分时,

protected void MyGridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
    if (e.Row.RowType == DataControlRowType.Footer)
    {
    TextBox txt = new TextBox();
          // set properties of text box
    e.Row.Cells[0].Controls.Add(txt);
    }
}

试试这个并发表评论。

编辑:这将是有帮助的
http://www.asp.net/data-access/tutorials/displaying-summary-information-in-the-gridview-s-footer-cs

关于c# - 如何在gridview中动态添加页脚行。带文本框,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/3131448/

10-09 15:59