First get the value from the backend to the datatable........... like
DataTable dt = new DataTable();
dt=// your database table value.
DataColumn DC1 = new DataColumn("lbl_AutoID");
DC1 .AutoIncrement = true;
DC1 .AutoIncrementSeed = 1;
DC1 .AutoIncrementStep = 1;
dt.Columns.Add(DC1 );
Then bind the datatable values to the gridview
gridview.datasource =dt
gridview.databind();
dont copy this code because im directly wrote there........
Regards
Muralidoss M
Britsouls, if this helps please login to Mark As Answer. |
Reply | Alert Moderator