How to add new row to gridview before fill it from datatable?
-
I have agridview i fill it from datatable but i want to add new emptyrow af first before filling
-
I have agridview i fill it from datatable but i want to add new emptyrow af first before filling
gridview.Rows.add("",""....); OR gridview.Rows.add(5);
EASY COME EASY GO
-
gridview.Rows.add("",""....); OR gridview.Rows.add(5);
EASY COME EASY GO
i tried this gridview1.Rows.Add(); gridview1.DataSource = ds; this exception No row can be added to a DataGridView control that does not have columns. Columns must be added first.
-
i tried this gridview1.Rows.Add(); gridview1.DataSource = ds; this exception No row can be added to a DataGridView control that does not have columns. Columns must be added first.
this exception No row can be added to a DataGridView control that does not have columns. Columns must be added first. so what do you think the problem??? how many col in your database? if 2 then for example: gridview1.columns.add("id","id"); gridview1.columns.add("name","name"); then try it if it did not work try to add them row by row
EASY COME EASY GO
-
this exception No row can be added to a DataGridView control that does not have columns. Columns must be added first. so what do you think the problem??? how many col in your database? if 2 then for example: gridview1.columns.add("id","id"); gridview1.columns.add("name","name"); then try it if it did not work try to add them row by row
EASY COME EASY GO
Thank u sanforjackass thats help me alot.
-
Thank u sanforjackass thats help me alot.
;)
EASY COME EASY GO