Change data table of the DataGridViewComboBoxColumn-cell only for the new row ?
The existing data contains values that are not allowed to be selected for new records. If I bind the whole combobox-column to the reduced dataset I get errors, as some old value keys have no counterpart in the reduced dataset comboboxbox.
Is there a way to use the combobxcolum but to change the combo box for the new record row. If no, then I can add combo box cells to each row with the right selection.
Re: Change data table of the DataGridViewComboBoxColumn-cell only for the new row ?
Re: Change data table of the DataGridViewComboBoxColumn-cell only for the new row ?
Thank you! I accept a "no" for my first question, but is the second no for my planned alternative solution?
Re: Change data table of the DataGridViewComboBoxColumn-cell only for the new row ?
No the second no was because "No" is too short a reply to be accepted by the editor! I hadn't really considered your alternative but now I have it probably would get a 'no'. Is it necessary to view the records that have the invalid entries? If not then I would recommend you create a DataView to exclude them altogether from the grid. Otherwise, you'll have little choice but to create some kind of validation routine as insurance against anyone adding a record with the invalid choices (or simply bring all the records in the database up to date with regard to this column).
Re: Change data table of the DataGridViewComboBoxColumn-cell only for the new row ?
Ok, now I've just learnt something about DGVs that might suggest a way that you could do this using a customised cell type, I may have to have another think about this. I'd still prefer the data to be consistent but other possibilities do now arise.