Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to bind dataset to textbox?
Message
From
21/10/2013 09:51:03
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01585915
Message ID:
01585925
Views:
39
>On the same page I have a GridView bound to a dataset. Below the GridView there is a textbox (or several textboxes). As user navigates through the GridView (clicking on this or that row) I want the value/text in the textbox(s) to be updated according to new row in the dataset. My understanding is I need to bind the textbox(s) to the same dataset. How do you do it? An example, of one textbox binding to the dataset would be very helpful.
>TIA

Dimitry

This is how I do it with a Winform. I'm not sure whether ASP.NET does it the same way.
Actually, you don't bind to a dataset. You bind to a column in a datatable that belongs to a dataset.
miscSysdataInf.sysdatads is a strongly typed dataset.
appuser is a datatable and username is the column.
  textBoxUsername.DataBindings.Add("Text", miscSysdataInf.sysdatads.appuser, "username");
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform