Newbie: How to do New Record Question

G

Guest

Hi All,

New here to .NET and am having difficulty conceptually understanding how one would use Datasets and have an empty form open up ready for data input. It seems like all of the examples I've found are related to showing how to display existing data in a grid (lots of examples here), or set bindings to controls on a form and then display the associated data.

What's lacking however in the many examples I've found is having a databound form that opens up empty and the user can then start enter data into it. Seems my understanding at this point is all about loading up that dataset for display, but for a new record, I really haven't done any kind of dataset loading yet, have I?

If some kind guru could point me in the right direction or share a resource that I can study to get this figured out, I'd be greatly appreciative.

Thanks..Bob

Bob McCormick
 
M

Mike in Paradise

If you have your databound and you want to add a new
record I do it through the currency manager AddNew as
follows:

CurrencyManager cm = (CurrencyManager)this.BindingContext
[theDataSet.theDataTable];
cm.AddNew();

This will give you a new row to all of your
boundcontrols, at least that is the way that I do it..

I have ADO.Net by David Sceppa isbn 7356-1423-7 which is
very good.

Also:

http://www.syncfusion.com/FAQ/WinForms/default.asp#43

has some pointers...

Have fun..

-----Original Message-----
Hi All,

New here to .NET and am having difficulty conceptually
understanding how one would use Datasets and have an
empty form open up ready for data input. It seems like
all of the examples I've found are related to showing how
to display existing data in a grid (lots of examples
here), or set bindings to controls on a form and then
display the associated data.
What's lacking however in the many examples I've found
is having a databound form that opens up empty and the
user can then start enter data into it. Seems my
understanding at this point is all about loading up that
dataset for display, but for a new record, I really
haven't done any kind of dataset loading yet, have I?
If some kind guru could point me in the right direction
or share a resource that I can study to get this figured
out, I'd be greatly appreciative.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top