|
-
Nov 4th, 2002, 10:59 AM
#1
Thread Starter
Member
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
-
Nov 4th, 2002, 11:23 AM
#2
Hyperactive Member
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

-
Nov 4th, 2002, 12:44 PM
#3
Thread Starter
Member
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.
-
Nov 4th, 2002, 02:07 PM
#4
PowerPoster
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....
-
Nov 4th, 2002, 05:16 PM
#5
Thread Starter
Member
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,
-
Nov 5th, 2002, 04:59 AM
#6
New Member
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.
-
Nov 5th, 2002, 05:15 AM
#7
Thread Starter
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|