PC Review


Reply
Thread Tools Rate Thread

ADO.Net databinding Help

 
 
=?Utf-8?B?TWljaGFlbA==?=
Guest
Posts: n/a
 
      22nd Aug 2005
Hi everyone,
I'm working on cutting down code in a form I'm working on, and decided to
bind the controls to a dataset. I have two problems now. I have a couple
datasets that I'm binding to.
1. I have all databinding properties set for the control. When I fill the
dataset, there is now data showing up in the control. I'm using this code to
load the dataset:
With daIndTreatPlan1.SelectCommand.Parameters
.Item("@PatientId").Value = cmbPatientSelect.Columns(0).Value
End With
DsIndTreatmentPlan1.IndivdualizedTreatmentPlan.Clear
isDatesLoading = True
daIndTreatPlan1.Fill(DsIndTreatmentPlan1.IndivdualizedTreatmentPlan )
isDatesLoading = False
If DsIndTreatmentPlan1.IndivdualizedTreatmentPlan.Rows.Count > 0 then
cmbTreatmentPlanDate.SelectedIndex = 0
End If
All the controls are set properly to get the data off the
DsIndTreatmentPlan1 dataset. These controls worked fine until the original
dataset of deleted off the form, but since then I have recreated the dataset
and reset the databinding properties for all the control. But again the
controls display no data when I know there is data. What could this be?

2. I also need a hand with the cursor movement. I have report Date Combobox,
when the user selects a date, I'd like the controls that are bound to the
save dataset to move to the record that was selected from the combo, but the
only data that changes is the data in the combo. In other words, the other
controls are not keeping up with the cursor. I beleive I will have to use the
CurrencyManager to handle the cursor position, But how would I sync the
cursor with the seleted item in the combobox?
Thanks for any suggestion that you could offer.
Michael Lee

 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Databinding expressions are only supported on objects that have a DataBinding event jobs Microsoft ASP .NET 0 26th Sep 2007 12:54 AM
Gridview encoding, or how to run commands before gridview's default databinding, or, how do I disable default databinding at all? Sergei Shelukhin Microsoft ASP .NET 1 12th Nov 2006 01:43 PM
Databinding Alan T Microsoft C# .NET 2 17th Jul 2006 05:08 PM
Databinding Bible (REPOST FROM m.p.d.f.WindowsForms.Databinding) a Microsoft ADO .NET 1 16th Jul 2004 03:26 AM
ADO.NET and ASP.NET DataBinding Lloyd Sheen Microsoft ADO .NET 0 29th Jun 2004 02:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:32 AM.