|
i have a gridthat has 3 columns among them one is a DataGridViewComboBoxColumn am adding colums programatically while loading the form. as
DataGridViewComboBoxColumn Col1=new DataGridViewComboBoxColumn(); Col1.Name="UOM"; Col1.DataSourse=dt; Col1.ValueMember="id"; Col1.DisplayMember="Name";
the problem is that when i display data back to the grid ,i cant assign thevalue
like
dataGridView1.Rows[1].Cells["UOM"].Value=12; dataGridView1.Rows[2].Cells["UOM"].Value=14;
it throws an Exceptions saying System.Format Exception the DataGridViewCmboboxCell Value is not valid
somebody please help....
Dare To Explore- Moved bynobugzMVP, ModeratorSunday, March 15, 2009 1:26 PMnot a bcl q (Moved from .NET Base Class Library to Windows Forms Data Controls and Databinding)
-
|