I have a temporary datatable,
private DataTable getmyDatatable()
{
DataTable dt = new DataTable();
DataColumn dc;
dc = new DataColumn("Name");
dt.Columns.Add(dc);
dc = new DataColumn("Age");
dt.Columns.Add(dc);
dc = new DataColumn("Address");
dt.Columns.Add(dc);
dc = new DataColumn("Phone");
dt.Columns.Add(dc);
//dc = new DataColumn("Sex");
//dt.Columns.Add(dc);
dt.Rows.Add("bala", "24", "cbe","999444444");
dt.Rows.Add("chendur", "23", "b开发者_运维问答angalore","9999999999");
dt.Rows.Add("chchandru", "22", "chennai","888888888");
return dt;
}
Now i want this datatable to bind it to a gridview and work out row editing,row deleting,row updating, new row add etc... As i am a beginner refer me good/simple example asp:gridview describing all its functionalities? Any suggestion..
Asp.net QuickStart for GridViews is one option.
精彩评论