PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Re: Dataset updates from bound controls

Reply

Re: Dataset updates from bound controls

 
Thread Tools Rate Thread
Old 29-06-2003, 03:49 AM   #1
Kathleen Dollard
Guest
 
Posts: n/a
Default Re: Dataset updates from bound controls


Noel,

There are a couple of ways to do that. You can use bound controls, but if
you aren't using typed datasets you won't get design time support. I am not
clear what you are saying about when it works. If you are using binding and
it is successful with the first record, you may just not be repositioning to
the second record. You may need to tell us more about what you are seeing
when it doesn't work.

Alternatively, if you aren't successfully binding to your data, the simplest
way may just be to explicitly set the values.

dr("fieldname") = txtWhatever.Text

Kathleen

"Noel Justus" <njustus@bak.rr.com> wrote in message
news:c208a3bd.0306261553.2b499b04@posting.google.com...
> I have several controls bound to a single table in a dataset(not
> typed). The data set will contain a single row at any given
> time...Everything works fine when I populate the dataset with existing
> values from a database.
>
> However, I am unable to populate the dataset to the values of my
> controls when I create a new (blank) row. Some of the controls are
> datetimepickers, checkboxes, etc which I reset to default values after
> an update.
>
> The new row creation is:
> dr = dsJobs.Tables(0).NewRow
> dsJobs.Tables(0).Rows.Add(dr)
>
> What and when allows the new row in the dataset to obtain the values
> of the controls?
> Thanks,



  Reply With Quote
Old 03-07-2003, 01:16 AM   #2
Noel Justus
Guest
 
Posts: n/a
Default Re: Dataset updates from bound controls

The real problem simply seems to be setting the value of a control
thru code.
Changing the text value of a bounded textbox from an independent
button control does not seem to cause the dataset to be updated.
I've tried all kinds of combinations using beginedit and endedit but
some other event needs to be initiated.
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off