Please tell me in detail its urgent.
How to add rows in table layout panel in runtime. and also in gridview(edit,delete)
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Oct 15, 2010, 10:10 AM
http://www.aspdotnetcodes.com/GridView_Insert_Edit_Update_Delete.aspx
http://aspalliance.com/1125
http://csharpdotnetfreak.blogspot.com/2009/05/gridview-sqldatasource-insert-edit.html
http://www.dotnetspark.com/kb/643-how-to-editupdatedelete-gridview.aspx
http://www.aspsnippets.com/Articles/ASP.Net-GridView--Insert-Edit-Update-and-Delete-the-ADO.NET-way.aspx
Posted Oct 15, 2010, 10:05 AM
ASPX Code :
<asp:Panel ID="Panel1" runat="server">
<asp:Table ID="table1" runat="server">
asp:Table>
asp:Panel>
Server Side Code :
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
TableHeaderRow headerrow = new TableHeaderRow();
TableHeaderCell headercell = new TableHeaderCell();
headercell.Text = "Header";
headerrow.Cells.Add(headercell);
table1.Rows.Add(headerrow);
TableRow row = new TableRow();
TableCell cell = new TableCell();
cell.Text = "Cell1";
row.Cells.Add(cell);
table1.Rows.Add(row);
table1.Visible = true;
}
}
Hope this helps you.