DropDownList in Gridview to update record getting problem...

Posted by Navalemanoj0405 under ASP.NET on 6/23/2011 | Points: 10 | Views : 1666 | Status : [Member] | Replies : 1
Dear all ,
I am working on gridview and there are two dropdownlist in gridview edit template with respective sqldatasource.
what i want to do is update the record when i will click on update button which is generated through gridview
but it is throwing error :
Cannot insert the value NULL into column 'CompanyID', table 'RealValue.dbo.tbl_BikePrcInfo'; column does not allow nulls. UPDATE fails.
The statement has been terminated.
i don't want to do code in .cs file is it possible?
please help me

Thanks in adv....... :)


Posted by: Jpchoudhari on: 6/23/2011 [Member] Starter | Points: 25


It seems that comapnyID column in your table is not permitting NULL values.
Unless you validate this you can't update.

Thanks and Regards,
Jaydeep Choudhari

Kind Regards,

Navalemanoj0405, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response