|
-
May 10th, 2013, 10:43 AM
#1
Thread Starter
Addicted Member
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.
-
May 10th, 2013, 10:51 AM
#2
Re: Change data table of the DataGridViewComboBoxColumn-cell only for the new row ?
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
May 10th, 2013, 10:57 AM
#3
Thread Starter
Addicted Member
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?
-
May 10th, 2013, 11:11 AM
#4
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).
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
May 10th, 2013, 11:22 AM
#5
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.
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|