protected void gridview_RowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.Header) { TextBox txtsearch1; for (int i = 0; i < e.Row.Cells.Count; i++) { txtsearch1 = new TextBox(); txtsearch1.ID = e.Row.Cells[i].Text; txtsearch1.Attributes["placeholder"] = e.Row.Cells[i].Text; e.Row.Cells[i].Controls.Add(txtsearch1); } } }
GridView
TextBox
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)