Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datagrid: Retreiving a value from a column
Message
 
À
08/10/2002 10:18:16
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00708298
Message ID:
00708759
Vues:
8
SelectedIndex is not available in Winform datagrid control.

>>Once the data is sorted, you have to go through binding context object.
>
>Hi Jayesh,
>
>I've been able to do this without a binding context. If the grid is bound to the DefaultView of a DataTable, I can do something like (I don't have VS.NET or the code with me, so this is just from memory):
>
>
dataTable.DefaultView[dataGrid.SelectedIndex]["id"].ToString();
>
>Sorting the grid must also sort the default view identically, which is why the index numbers match up regardless of how the grid is sorted.
>
>Do you know if there are advantages or disadvantages to using this method versus the binding context?
- Jayesh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform