Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    India
    Posts
    31

    Unanswered: Move flexgrid rows

    hi all

    i am faced with a boring problem

    User adds/ removes items from a flexgrid. They r of diffrent backcolor....depending on category
    User wants also the facility to move rows Up and Down
    I have figured that out
    but i am not able to change color as per the row movement

    please see screenshot
    thanks
    Yogesh Jangam
    Attached Thumbnails Attached Thumbnails screenshot.JPG  
    Do not walk behind me, for I may not lead.
    Do not walk ahead of me, for I may not follow.
    Do not walk beside me, either.
    Just leave me alone.

    Yogesh Jangam
    http://yogeshjangam.blogspot.com

  2. #2
    Join Date
    Jan 2004
    Location
    India
    Posts
    31

    Unhappy

    no reply

    any way
    i will elaborate again.

    User will click the required row and either click move up or down.....
    I am able to do taht with below code
    Code:
    Public Sub MoveRow(intFrom As Integer, intTo As Integer)
    Dim tmpQID As Integer
    Dim tmpQText As String
    Dim tmpRowCol As Long
    
    If intTo <> 0 Or intTo <> msfTestQuestions.Rows - 1 Then
    With msfTestQuestions
      tmpQID = .TextMatrix(intTo, 1)
      tmpQText = .TextMatrix(intTo, 2)
      tmpRowCol = .BackColor ' ???? help here
      
      .TextMatrix(intTo, 1) = .TextMatrix(intFrom, 1)
      .TextMatrix(intTo, 2) = .TextMatrix(intFrom, 2)
      .TextMatrix(intFrom, 1) = tmpQID
      .TextMatrix(intFrom, 2) = tmpQText
    End With
    End If
    End Sub
    i call this function to move up or down
    for ex....to move up
    Code:
    Call MoveRow(msfTestQuestions.Row, msfTestQuestions.Row - 1)
    now i need is to move the color also
    something like swap color

    i have tried .Backcolor , .CellBackcolor

    please help
    some one
    btw yellow color indicates selected row
    Do not walk behind me, for I may not lead.
    Do not walk ahead of me, for I may not follow.
    Do not walk beside me, either.
    Just leave me alone.

    Yogesh Jangam
    http://yogeshjangam.blogspot.com

  3. #3
    Join Date
    May 2004
    Posts
    97
    You are trying to change the back color of the ROW and you cannot do that. You will have to loop from col 0 to col max and change the back color with CellBackColor property.

    The BackColor property affects ALL non fixed cells. BackColorSel is the color of the selected row, and BackColorBkg is the background color.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •