DataGridView problem
-
I create a DataSet with 4 tables in it from a mdb file using the Wizard of the VS Express 2008. I have a DataGridView and I display the data of the "Transaction" table. I also have a table with my suppliers called "Suppliers". In "Transaction" table I have a column called "Supplier". I have enabled the options to add,edit or delete record in the DataSet and to save all the changes back to the mdb file. To provide an easier way for the user to add new records I set "Supplier" columnType in the DataGridView as DataGridViewComboBoxColumn and DisplayMember, DataSource and ValueMember to the "Name" column in the Supplier table so the user can directly select the name name of the supplier without having to type it. So when I run the program and load the form I get the following error message: System.ArgumentException: DataGridViewComboBoxCell value is not valid. Any help would be appreciated.... Thank you
-
I create a DataSet with 4 tables in it from a mdb file using the Wizard of the VS Express 2008. I have a DataGridView and I display the data of the "Transaction" table. I also have a table with my suppliers called "Suppliers". In "Transaction" table I have a column called "Supplier". I have enabled the options to add,edit or delete record in the DataSet and to save all the changes back to the mdb file. To provide an easier way for the user to add new records I set "Supplier" columnType in the DataGridView as DataGridViewComboBoxColumn and DisplayMember, DataSource and ValueMember to the "Name" column in the Supplier table so the user can directly select the name name of the supplier without having to type it. So when I run the program and load the form I get the following error message: System.ArgumentException: DataGridViewComboBoxCell value is not valid. Any help would be appreciated.... Thank you
yeah that DataGridViewComboBoxColumn is a tricky lil bugger! ive had a problem with mine for almost two weeks now. but my problem is that the table in question references itself good luck tho
Harvey Saayman - South Africa Junior Developer .Net, C#, SQL think BIG and kick ASS
you.suck = (you.passion != Programming)
-
I create a DataSet with 4 tables in it from a mdb file using the Wizard of the VS Express 2008. I have a DataGridView and I display the data of the "Transaction" table. I also have a table with my suppliers called "Suppliers". In "Transaction" table I have a column called "Supplier". I have enabled the options to add,edit or delete record in the DataSet and to save all the changes back to the mdb file. To provide an easier way for the user to add new records I set "Supplier" columnType in the DataGridView as DataGridViewComboBoxColumn and DisplayMember, DataSource and ValueMember to the "Name" column in the Supplier table so the user can directly select the name name of the supplier without having to type it. So when I run the program and load the form I get the following error message: System.ArgumentException: DataGridViewComboBoxCell value is not valid. Any help would be appreciated.... Thank you
Check the
AutoSizeMode
property of yourDataGridView
. You may have set some column(s) to expand the column width to fit the data. Depending on what data you have there (or actually you don't have :-)), you will get that kind of error if thelookup
is turned on.SkyWalker