Results 1 to 7 of 7

Thread: Datagrid, dbgrid, msflexgrid

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    50

    Datagrid, dbgrid, msflexgrid

    Which one are you using? Which is the best? Is there another option?

    What I really want to be able to do is highlight rows (either by backcolor or font) depending on values in a particular field i.e. field value=0 white, field value=1 grey. Tried it in MSflexgrid, Datagrid and DBgrid with no luck, also can't find anything on the net.

    Cheers

  2. #2
    Hyperactive Member csar's Avatar
    Join Date
    Mar 2002
    Location
    Siam
    Posts
    288
    from my experience..

    MSFlexGrid is best for display data in colorful, and flexible enough to control saving,updating record..

    DataGrid is best for display a lot of record, fast and buffering before display record. But not for updating data.

    DBGrid ?!? no idea..
    Don't leave it till tomorrow, Do It Now!
    5361726176757468204368616E63686F747361746869656E

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    50
    ok but how do you have the current record in the MSFlexgrid the current record on your form - so you can have a txtBox bound in order to apply changes. You say the datagrid is not good for updating, but you can't update with the MSFlexgrid? Can you? So what do you use for updating?

    Oh and do you know how to apply a different colour to a row depending on the value of a field?

    Thanks,
    Adam.

  4. #4
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    I use Flexgrid for displaying the data. If user wants to edit a particular row, I popup a form which allows them to edit. You can invoke in-line editing, by hovering a texbox, but I personally avoid the situation as much as possible (not to sya I haven't used it this way)...
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  5. #5

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    50
    i've just found the MSHFlexgrid aswell, whats that one all about!!

    I've looked into the sugestion about the textbox for editing. How do I get it to store the new value if the flexgrid were bound to a recordset.

    any ideas regarding which grid you use and the pro's/con's and features would be great.

    Thanks,

  6. #6
    New Member
    Join Date
    Aug 2002
    Posts
    15

    Lightbulb

    Hi there,
    in case u want to update records or add new records from a grid, MS Datagrid is the best one. It has all those properties.
    Think more, Code less!

  7. #7

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    50
    I cannot get the MS datagrid to display a different row colour for depending on the value of a field.

    (This is an adaptation of code by James Stanich in Aug00 - credit to him)

    Here's how I did it with MSflexgrid but like I say, you cannot edit it when bound to a data control.

    Private Sub Command1_Click()
    Dim IntNext As Integer, IntMax As Integer
    Dim IntNextcol As Integer, IntMaxcol As Integer

    IntMax = Me.MSFlexGrid1.Rows - 1
    IntMaxcol = Me.MSFlexGrid1.Cols - 1

    For IntNext = 1 To IntMax

    ' Search column 1 for "3"

    If Me.MSFlexGrid1.TextMatrix(IntNext, 1) = "3" Then

    ' Text "3" found !!!
    ' Make the whole row green
    For IntNextcol = 1 To IntMaxcol
    Me.MSFlexGrid1.Col = IntNextcol
    MSFlexGrid1.CellBackColor = vbGreen
    Next

    Me.MSFlexGrid1.Row = IntNext
    End If
    Next
    end sub

Posting Permissions

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



Click Here to Expand Forum to Full Width