Solved

Move row in Msflexgrid

Posted on 2003-11-26
3
1,045 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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 …

758 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

19 Experts available now in Live!

Get 1:1 Help Now