Solved

Move row in Msflexgrid

Posted on 2003-11-26
3
1,052 Views
Last Modified: 2012-06-27
How to write code for moving row in MSflexgrid?
where i can find the sample code
0
Comment
Question by:cyseng10
  • 2
3 Comments
 
LVL 9

Expert Comment

by:bhagyesht
ID: 9830216
assume fg is the flexgrid object this will move a row up


    Dim strTemp As String
    If fg.Row > 1 Then
        For i = 1 To fg.Cols - 1
            strTemp = fg.TextMatrix(fg.Row - 1, i)
            fg.TextMatrix(fg.Row - 1, i) = fg.TextMatrix(fg.Row, i)
            fg.TextMatrix(fg.Row, i) = strTemp
        Next i
    End If
0
 
LVL 1

Author Comment

by:cyseng10
ID: 9835510
the sample code working well for move up row. if i want move down row. how the code will be?

how do i apply using mouse to move row up and down when row selected?

0
 
LVL 9

Accepted Solution

by:
bhagyesht earned 100 total points
ID: 9835532
   Dim strTemp As String
    If fgDesign.Row < fgDesign.Rows - 2 Then
        For i = 1 To fgDesign.Cols - 1
            strTemp = fgDesign.TextMatrix(fgDesign.Row + 1, i)
            fgDesign.TextMatrix(fgDesign.Row + 1, i) = fgDesign.TextMatrix(fgDesign.Row, i)
            fgDesign.TextMatrix(fgDesign.Row, i) = strTemp
        Next i
    End If
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
countPairs challenge 7 66
Not needed 13 93
tvirtualstringtree freeze when load too manny images 10 52
How to obtain Administrator permission when you are the Administrator 6 62
RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now