Hi,
Plzz look at the code below:
if (menuType == "city")
{
DataSet DSLoadMaster = obj.LoadDataSet("Select * from city_master");
// Here we'll add a blank row to the returned DataTable
DataTable DT = DSLoadMaster.Tables[0];
DataRow DR = DT.NewRow();
DT.Rows.InsertAt(DR,0);
//Creating the first row of GridView to be Editable
GVDetails.EditIndex = 0;
GVDetails.DataSource = DT;
GVDetails.DataBind();
}
i am trying to insert a new row in gridview which has dynamically created bound fields. I get an error cityname doe not allow null values..
Loading

Suthish NairPosted Aug 24, 2011, 6:51 AM
Pravin MorePosted Aug 24, 2011, 6:51 AM
your code is correct.error might be because of table column constraints.that column is not allowing null value.