PC Review


Reply
Thread Tools Rate Thread

Bind Text Boxes to DataSet

 
 
Steve Bishop
Guest
Posts: n/a
 
      28th Apr 2004
All the examples I have bind text boxes to the DataReader. Can someone
give me an example on how to bind some text boxes or labels to my
DataSet object. Help appreciated. Thanks.
Steve



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
William Ryan eMVP
Guest
Posts: n/a
 
      28th Apr 2004
myLabel.DataBindings.Add("Text", datasetName "Table.FieldName")
or ("Text", DataSetName.Tables[Whatever], "FieldName")

You'll also want to check out the bindingcontext class
"Steve Bishop" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> All the examples I have bind text boxes to the DataReader. Can someone
> give me an example on how to bind some text boxes or labels to my
> DataSet object. Help appreciated. Thanks.
> Steve
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
Steve Bishop
Guest
Posts: n/a
 
      28th Apr 2004
I tried a couple combinations here but not having luck. I get error:
Compiler Error Message: CS0117: 'System.Web.UI.WebControls.TextBox' does
not contain a definition for 'DataBindings'

Source Error:
Line 29: objDataSet.Tables["dtAR1"].DefaultView.RowFilter =
Filter;
Line 30:
Line 31: TextBox3.DataBindings.Add("Text",
objDataSet.Tables["dtAR1"], "CustomerNumber");
Line 32: TextBox4.DataBindings.Add("Text",
objDataSet.Tables["dtAR1"], "CustomerName");
Line 33:

Help apprecaited




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
DataGrid Bind to DataSet, then Bind to DaTaview, GOT ERROR...PLS HELP A_PK Microsoft Dot NET Compact Framework 16 13th Apr 2005 04:27 AM
DataGrid Bind to DataSet, then Bind to DaTaview, GOT ERROR...PLS HELP A_PK Microsoft VB .NET 17 13th Apr 2005 04:27 AM
How to update to DB with a text box that is bind to dataset xs Microsoft ADO .NET 4 26th Nov 2004 08:22 AM
RE: Bind Text Box to DataSet Steve Bishop Microsoft C# .NET 0 28th Apr 2004 08:11 PM
Bind Text Box to DataSet Steve Bishop Microsoft C# .NET 0 28th Apr 2004 01:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:50 AM.