Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting a line
Message
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
VB 8.0
OS:
Vista
Network:
Windows XP
Database:
Jet/Access Engine
Miscellaneous
Thread ID:
01500152
Message ID:
01500162
Views:
42
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform