Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting a line
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
VB 8.0
OS:
Vista
Network:
Windows XP
Database:
Jet/Access Engine
Divers
Thread ID:
01500152
Message ID:
01500162
Vues:
41
>Deleting a line from a datagridview is a no brainer :
>
>(bindingsource).RemoveCurrent()
>
so you insert a line as follows (it's simpler if your grid is not bound btw).
>
           Dim r As (Datatable)Row = (Datatable).New(Datatable)Row
            Dim rIndex As Integer : rIndex = (grid).CurrentRow.Index
            (datatable).Rows.InsertAt(r, rIndex)
            Dim col As Integer = (grid).Columns((firstvisiblefield)).Index
            (grid).CurrentCell = grid(col, rIndex)
            (grid).Focus()
>

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform