List Info

Thread: How to force DataGridView to add the new (just filled in) row into itself manually?




How to force DataGridView to add the new (just filled in) row into itself manually?
country flaguser name
United States
2007-02-18 04:42:16
Hi,
I have a DataGridView and a toolbar with buttons. I need to
force
DataGridView to validate and add the row user has just
filled in
(which is still not the part of the actual DGV.Rows
collection, I
guess) to itself after clicking on the toolbar button.

The situation is this:
1. I have a DataGridView, one row (the last) is empty -- for
new data
2. I start typing into this empty row, new empty row
appears
immediately while the edited row is still not part of the
DGV.Rows
collection.
3. I click on the toolbar button and need the edited row to
be
validated and, if validation succeeds, added into the
DGV.Rows
collection

The problem is the edited row becomes part of the collection
after I
click into the new empty row (and maybe after some other
events
occur), which is not what happens. Instead, I click on the
toolbar
button and it seems like the DGV never even loses focus...

Sorry for this indistinct description...

Any ideas?

TIA

With regards
nvx


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "C# Community" group.
To post to this group, send email to csharpgooglegroups.com
To unsubscribe from this group, send email to
csharp-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/csharp?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )