L
Lorenz Kahl
Hi again,
I'm pretty new to Winforms & DataBinding and I'm currently running into
a lot of issues. Sorry if this has been explained before.
I have a DataSet containing a table 'Member' that holds a lot of columns
with info about members. Most of these columns are declared to be 'not
null' in the DB.
My WinForm for displaying members consists of a Listbox showing basic
info (full name) of a member, and a Textbox for each column showing the
details of the currently selected member. Ok, pretty much standard.
I'd like to have a button 'insert new member'. When it is pressed I'd
like to have a new (empty) entry in my Listbox and the detail-Textboxes
blanked out.
I tried it the way as it's propagated in many tutorials and books I found:
* use the NewRow()-method of the Member-table
* add it to the Member-table
But when I try to add it all the 'NoNullAllowedException's are fired -
ok that's what they are there for ;-)
I'm looking for a best practice for this one - since it is so standard
there must be someone with a good solution.
I'd like to avoid creating a seperate 'create new member dialog' that
duplicates all the fields on the other form, so i cann collect data
before adding the new row...
Any suggestions greatly appreciated,
Lorenz
I'm pretty new to Winforms & DataBinding and I'm currently running into
a lot of issues. Sorry if this has been explained before.
I have a DataSet containing a table 'Member' that holds a lot of columns
with info about members. Most of these columns are declared to be 'not
null' in the DB.
My WinForm for displaying members consists of a Listbox showing basic
info (full name) of a member, and a Textbox for each column showing the
details of the currently selected member. Ok, pretty much standard.
I'd like to have a button 'insert new member'. When it is pressed I'd
like to have a new (empty) entry in my Listbox and the detail-Textboxes
blanked out.
I tried it the way as it's propagated in many tutorials and books I found:
* use the NewRow()-method of the Member-table
* add it to the Member-table
But when I try to add it all the 'NoNullAllowedException's are fired -
ok that's what they are there for ;-)
I'm looking for a best practice for this one - since it is so standard
there must be someone with a good solution.
I'd like to avoid creating a seperate 'create new member dialog' that
duplicates all the fields on the other form, so i cann collect data
before adding the new row...
Any suggestions greatly appreciated,
Lorenz