Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataGridView
Message
De
06/11/2007 15:53:35
 
 
À
06/11/2007 13:20:42
Sergio Ortiz
Tek Services Group, Llc
Hollywood, Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Versions des environnements
Environment:
C# 2.0
OS:
Vista
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01267049
Message ID:
01267120
Vues:
7
This message has been marked as a message which has helped to the initial question of the thread.
Sergio,

You can use the MyDataGridView.CurrentRow.Index to get the index into the grid's datasource. I assume that you want to pass a DataRow to your form? If so, you'd do something like this:
int i = MyDataGridView.CurrentRow.Index;
DataRow row = MyDataSet.MyTable.DefaultView[i].Row;
// or ....MyDataSet.Tables["MyTable"].... if you're not using Typed DataSets

// pass row into the called form
Does that help?

~~Bonnie




>I have a DataViewGrid on my form and an edit button.
>The click event of the edit button calls a form.
>
>How do I pass to the calling form the selected row on DataGridView???
>What do I pass to the calling form?
>
>Thanks,
>Sergio
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform