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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only