How am i supposed to edit the code so that it does not generate this error?
To override the specified value for individual cells, set the cell values after you set the column value.
I need to enforce cell validations on the datagridview cells so that it does not accept negative values.
I found a suitable code for it from the msdn library.
You'll be able to ask any tech support questions, or chat with the community and help others.
The text you specify is then displayed by the T: System.
Cell Template property to a new instance of a related type derived from the Data Grid View Cell class.
Types that derive from Data Grid View Column typically initialize the Data Grid View Column.
Unfortunately the code only allows integers to be entered in the datagridview.
Since i have a column name as "Item Name" which is supposed to be entered as text there is an issue in the code.