Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to bind dataset to textbox?
Message
De
21/10/2013 09:51:03
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01585915
Message ID:
01585925
Vues:
37
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform