how to add the footer row dynamically in gridview. with textboxes.. pls give any idea...
Since there can be only one footer row in the grid view IMO it is better to add the footer row by setting the ShowFooter
property of the grid view to true
. Setting the
FooterStyle
property can be helpful here.
When coming to the programming part,
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);
}
}
Try this and comment.
Edit : This will be helpful http://www.asp.net/data-access/tutorials/displaying-summary-information-in-the-gridview-s-footer-cs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With