How to add a static row to a gridview
add a static row to a gridview with c#. Here I explain how to add a static row to a gridview with c# protected void grd_Pre(object sender, EventArgs e) { GridViewRow gv = new GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal); TableCell TC = new TableCell(); TC.ColumnSpan = 3; TC.Text = "Gridview head";er TC.Attributes.Add("style", "text-align:right"); gv.Cells.Add(tc); this.GridView1.Controls[0].Controls.AddAt(0, gv); }