Avatar of emi_sastra
emi_sastra

asked on 

Moving data between datagridview problem.

Hi,

I use windows form using two datagridview.
I succeed to move data from on one grid to another.

The problem is at the target grid, the order is reverse order from source grid.
I mean the first row at source grid will be the last row at target grid.

Why is that?

How to solve this problem?

Thank you.
Visual Basic.NET

Avatar of undefined
Last Comment
emi_sastra
Avatar of MijaeDjinn
MijaeDjinn
Flag of Canada image

How are you "moving" the rows from grid1 to grid2?

If you are using a For loop or For Each?
Avatar of emi_sastra
emi_sastra

ASKER

HI MijaeDjinn,

Please see my code:
  With dgvCair

            For Each dgvRow As DataGridViewRow In .SelectedRows
                Add_Grid_Outstanding(dgvRow)
                .Rows.Remove(dgvRow)
            Next

        End With

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of MijaeDjinn
MijaeDjinn
Flag of Canada image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of emi_sastra
emi_sastra

ASKER

HI MijaeDjinn,

It works.

Thank you very much for your help.
Visual Basic.NET
Visual Basic.NET

Visual Basic .NET (VB.NET) is an object-oriented programming language implemented on the .NET framework, but also supported on other platforms such as Mono and Silverlight. Microsoft launched VB.NET as the successor to the Visual Basic language. Though it is similar in syntax to Visual Basic pre-2002, it is not the same technology,

96K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo