Someone please help me!
How to make checkbox in a vb6 datagrid column?
Thank you in advance
Printable View
Someone please help me!
How to make checkbox in a vb6 datagrid column?
Thank you in advance
Does this do it for you?
http://www.vbforums.com/showthread.p...mn-in-datagrid
Thanks Guy I will try it later
I test it, but it failed, if I may know what datagrid did he/she use?
'failed'? How so....what's the error, and where did it 'fail' (what line of code).....
Sorry, i have been late to answer u
From these codes:
.col = .cols - 1
.CellFontName = "Wingdings 2"
.CellFontSize = 16
.CellFontBold = True
.CellForeColor = QBColor(12)
I got:
"Compile Error:
Method or data member not found"
Tq 4 ur help
P.S. I use 'Microsoft DataGrid Control 6.0 (OLEDB)
Ty
AFAIK, you can use checkboxes on a plain datagrid. The control used in the link is probably an MSHFlexgrid or MSFlexGrid.
How? Can u give me the code?
Thanks
What is the NAME of your datagrid?...the example in that link uses "Grid1".
Sorry for my late to answer you, ya my datagrid name is GRIDX
Thx for your help
Did you get it to work?
Get what?
Master Sam, I have already change the "grid1" to "GRIDX" but it also didn't work
Can u give me another code or somethin else?
Thanks for your help,
VH
Maybe I can assist if you tell me what you mean by 'it also didn't work'. What error did you receive? Post YOUR code and show where the error occurred.
EDIT: Oops, JUST saw your code. That error message means what it says. SOUNDS like your grid name is incorrect. Can you post a bit more of your code showing what your dot col, dot CellFontName, etc apply to?
Private Sub GRIDX_KeyPress(KeyAscii As Integer)
Dim A As Integer
dim R1 as integer
R1 = GRIDX.Row
If R1 > 0 And (KeyAscii = 13) Then
With GRIDX
.Col = .cols - 1
.CellFontName = "Wingdings 2"
.CellFontSize = 16
.CellFontBold = True
.CellForeColor = QBColor(12)
End With
If GRIDX.TextMatrix(R1, 4) = "P" Then
GRIDX.TextMatrix(R1, 4) = ""
Else
GRIDX.TextMatrix(R1, 4) = "P"
End If
End If
Webbrowser1.Navigate = Winsock1
End Sub
The error message is
"Compile Error:
Method or data member not found"
Sorry for disturbing and wasting ur time
I see this is a COMPILE error; I am assuming you do not get any errors when RUNNING the program, correct? In your posted code (#18), you DO have one exraa "End If" in there, but that won't cause this type of Compile Error. And, I don't see what Winsock equals.
Have you tried running ALL your code before compiling it? Do you get any errors in any of your code.
SOMEWHERE in your code, you are referencing an object that doesn't exist....usually a misspelling, but sometimes it refers to your database call.
Has anyone considered post #8?
dee-u
U R Correct.....code is for MSFlex, not data, grid.
Vince...look at this link.....http://www.developerfusion.com/threa...th-checkboxes/
If you can't figure out that one, simply do a Google (or Bing) on "visual basic 6 datagrid checkboxes"
Thanks 4 all your help Sam & Dee, but, when I scroll the datagrid horizontally, the checkbox do not fix in the column I want.
Would you mind posting posting your code now...the one that works (before scrolling)? Include enough so we can view/replicate/analyze.
And when you state your issue(s), can you be a bit more descriptive.....What do you mean by "the checkbox do not fix in the column I want." (Do you mean 'fit'?) (Is it because the column is too narrow? Or is it because it is not in the correct column? Hard to understand the real issue.