Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DataGrid and its button in VB6?

671 views
Skip to first unread message

Joe Williams

unread,
Feb 9, 1999, 3:00:00 AM2/9/99
to
Okay, we're not TOTALLY inexperienced hackers with VB where I work, but we have
to admit being wonks on this one... to wit:

Has anyone some pointers on coding the button property that can be turned on for
a field in the "new" DataGrid control in VB6?

We can get the button to show up just fine when we click in the chosen field
during runtime (duh!), but we have no idea how to get it to drop down a list
from an associated database field for that DataGrid field.

We would like it to show a list of choices, from which the user can chose, from
one table and dump an associated indicator into the main table the grid
displays. We even called MS Tech Support, but they had no answers in terms of
what code to write.

The Help for the DataGrid says it has a "built in listbox, or a combo or
datalist box can be used" but give NO code examples for programming it. Shit!

If you have any code snippets that will explain that to the basically
challenged, or pointers to anything that may help, or project manager will be
eternally grateful. Really.

Thank you very much in advance!!!
Joe Williams
jwil...@korry.com


Max Healey

unread,
Feb 10, 1999, 3:00:00 AM2/10/99
to
Ok try this

put a data bound grid and a calander control on a from
set the calander (cal1) visable property to false
then try this.

Private Sub DBGrid1_ButtonClick(ByVal ColIndex As Integer)
X = DBGrid1.Col
If X = 1 Then
ColNo = X
Dim Co As Column
Set Co = DBGrid1.Columns(X)
Cal1.Left = 1060
' stop the grid from passing a null to the calander
If Co.Value <> "" Then
Cal1.Value = Co.Value
End If
' position the the calander net to the button and make it pop up
Cal1.Top = DBGrid1.Top + DBGrid1.RowTop(DBGrid1.Row)
Cal1.Visible = True
Cal1.ZOrder 0
Cal1.SetFocus
End If
End Sub


Joe Williams <jack...@jps.net> wrote in message
news:36c17...@news1.jps.net...

0 new messages