private void data Grid View1_Cell Validating(object sender, Data Grid View Cell Validating Event Args e) void data Grid View1_Cell End Edit(object sender, Data Grid View Cell Event Args e) And Voila!
I'm in kind of a pickle - I have a project due tonight and suddenly 2 of my datagridviews are acting funky while the others are fine. the first is books(id, title, copyright) and the next is publisher(id, name, bookid). It sounds to me like there may be a problem with the booktableadapter or bookbindingsource, but I don't know where to start looking for it.
I have a 3rd dgv referencing an unrelated table, and it has no problems.
The code for both the working and problematic dgvs are the same (only the control names are different). Thanks for your reply, but I found at least part of the problem.
Handled = True Return End If '---if the key pressed is not a valid decimal number--- If (Not (Char.
I still have some problems with the combobox not listing values properly, but setting up a new binding source for the combobox fixed the problem with the datagridview.My problem with the combobox is that on startup, it displays the id of the data row desired instead of the name value retrieved through the foreign key.If I click to show the list of available items for the combobox, it shows the names (as desired), not the ids.Every now and then cell values of Data Grid View have to be validated.We could use Cell Validating and Cell End Edit events to accomplish this.