|
-
May 20th, 2013, 06:57 PM
#1
Thread Starter
Member
Please help me about datagrid
Someone please help me!
How to make checkbox in a vb6 datagrid column?
Thank you in advance
Last edited by Vincent Hadison; May 20th, 2013 at 11:35 PM.
-
May 21st, 2013, 07:31 AM
#2
Re: Please help me about datagrid
-
May 21st, 2013, 06:21 PM
#3
Thread Starter
Member
Re: Please help me about datagrid
Thanks Guy I will try it later
-
May 22nd, 2013, 06:48 PM
#4
Thread Starter
Member
Re: Please help me about datagrid
I test it, but it failed, if I may know what datagrid did he/she use?
-
May 23rd, 2013, 10:02 AM
#5
Re: Please help me about datagrid
'failed'? How so....what's the error, and where did it 'fail' (what line of code).....
-
May 23rd, 2013, 09:32 PM
#6
Thread Starter
Member
Re: Please help me about datagrid
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
-
May 23rd, 2013, 09:35 PM
#7
Thread Starter
Member
Re: Please help me about datagrid
P.S. I use 'Microsoft DataGrid Control 6.0 (OLEDB)
Ty
-
May 24th, 2013, 02:53 AM
#8
Re: Please help me about datagrid
AFAIK, you can use checkboxes on a plain datagrid. The control used in the link is probably an MSHFlexgrid or MSFlexGrid.
-
May 24th, 2013, 04:35 AM
#9
Thread Starter
Member
Re: Please help me about datagrid
How? Can u give me the code?
Thanks
-
May 24th, 2013, 08:47 AM
#10
Re: Please help me about datagrid
What is the NAME of your datagrid?...the example in that link uses "Grid1".
-
May 27th, 2013, 08:07 PM
#11
Thread Starter
Member
Re: Please help me about datagrid
Sorry for my late to answer you, ya my datagrid name is GRIDX
Thx for your help
-
May 28th, 2013, 06:35 AM
#12
Re: Please help me about datagrid
-
May 28th, 2013, 07:20 AM
#13
Thread Starter
Member
Re: Please help me about datagrid
-
May 28th, 2013, 07:23 AM
#14
Thread Starter
Member
Re: Please help me about datagrid
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
-
May 28th, 2013, 07:27 AM
#15
Thread Starter
Member
Re: Please help me about datagrid
 Originally Posted by Vincent Hadison
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
and from these I got range on the word ".cols"
Thanks Master, sorry for disturbing you for a long time,
VH
-
May 28th, 2013, 07:28 AM
#16
Re: Please help me about datagrid
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?
-
May 28th, 2013, 07:35 AM
#17
Thread Starter
Member
Re: Please help me about datagrid
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
-
May 28th, 2013, 07:37 AM
#18
Thread Starter
Member
Re: Please help me about datagrid
And the error I got:
 Originally Posted by Vincent Hadison
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
-
May 28th, 2013, 07:39 AM
#19
Thread Starter
Member
Re: Please help me about datagrid
The error message is
"Compile Error:
Method or data member not found"
Sorry for disturbing and wasting ur time
-
May 28th, 2013, 08:12 AM
#20
Re: Please help me about datagrid
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.
-
May 29th, 2013, 12:35 AM
#21
Re: Please help me about datagrid
Has anyone considered post #8?
-
May 29th, 2013, 07:13 AM
#22
Re: Please help me about datagrid
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"
-
May 29th, 2013, 07:53 PM
#23
Thread Starter
Member
Re: Please help me about datagrid
Thanks 4 all your help Sam & Dee, but, when I scroll the datagrid horizontally, the checkbox do not fix in the column I want.
-
May 30th, 2013, 06:31 AM
#24
Re: Please help me about datagrid
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.
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
|