Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selecting a row in a DataGridView
Message
De
02/11/2007 10:45:24
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01265409
Message ID:
01266089
Vues:
13
Hi Kevin,

>>My Questions:
>>How can I obtain the value of the pk of the selected row of the bound datagridview?
>
>Check out the MM .NET Jump Start for creating a web application. It shows how to create a link from which you can grab the record's PK.

I had tried this as one method. I don't usually like to show a PK in grid as I use only surogate keys, typically of type guid. I suppose I can link something else and return the guid.

>
>>How can I get the EntityList to be navigated to this row?
>
>There really is no means of navigation or "current" item in .NET collections. In .NET this is information that is either mainted by the user interface or you maintain manually.

If I do the above method, then I would still have to bind all the controls manually. I cannot just return a single row since I need the grid to still be populated. Or alternatively I can use the "Return two sets of data from the same BO" again.
>
>>How can I cause the textboxes to refresh their binding to show the current entity?
>
>You can call the web form's BindControl() method to rebind the control.
>
Thanks Kevin
Tim
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform