Adding a new row at the footer of a GridView

A

a.mustaq

Hi All,

I want to add a new row in the footer of a grdview,
which can accept input.Please help in acheiving this.

Regards
Mustaq Ahmed.A
 
M

Masudur

Hi All,

I want to add a new row in the footer of a grdview,
which can accept input.Please help in acheiving this.

Regards
Mustaq Ahmed.A

hi...

i have subscribed the rowcreated event of gridview

protected void GridView1_RowCreated(object sender,
GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Footer)
{
TableRow tr = new TableRow();

TableCell cell1 = new TableCell();
cell1.Text = "Just a button";

TableCell cell2 = new TableCell();
Button btn = new Button();
btn.ID = "baba";
btn.Text = "Yahoo ! i mm in footer";
btn.Click += new EventHandler(btn_Click);
cell2.Controls.Add(btn);

e.Row.Cells.Clear();
e.Row.Cells.Add(cell1);
e.Row.Cells.Add(cell2);

}

}


void btn_Click(object sender, EventArgs e)
{
string s = e.ToString();
}


and the customized the footer...

you can clear the row and add a single cell and then populate the cell
with one table with multiple row....

Thanks
Masudur
www.kaz.com.bd
http://munnacs.110mb.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top