Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you bind a textbox directly to a datarow?
Message
 
To
13/05/2003 11:02:56
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00787653
Message ID:
00788031
Views:
23
Why thank you, Bonnie. I've gone ahead and passed a DataView to the form and it works just fine.


>Don,
>
>AFAIK, you can't do it ... but I haven't searched really hard to see if I'm wrong. I'm pretty sure that you can DataBind only to a table or dataset. I'd recommend passing the table and row number to the form instead of the row itself ...
>
>~~Bonnie
>
>
>>Is there a way to bind a textbox .text property directly to a datarow or must this always be via a dataset?
>>
>>I'm passing a datarow as a parameter to a form and am using code like this:
>>
>>txtName.DataBindings.Add("Text", dr, "Name")
>>
>>Where "Name" is a column in the datarow. But I get an error "Can't bind to property or column Name on datasource."
>>
>>In the Watch window I can see the column and it has data in it, so it seems like I should be able to do this. But I haven't found any examples or references in Help or searching this site.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform