2
Answers

ColumnName does not allow nulls

B M Suchitra

B M Suchitra

13y
2k
1
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..

Answers (2)