Solved

combobox in Flex Grid

Posted on 2001-08-17
8
2,072 Views
Last Modified: 2012-08-14
Hello
        I have to view a table record in Flex Grid , The table has a combobox , now i want to view that combobox in the Flex Grid just like the part of cell like we can view in Access. Pleaze tell me how can i do this.
Will be thankfull for ur answer .
0
Comment
Question by:arzoo
  • 4
  • 3
8 Comments
 
LVL 3

Expert Comment

by:andysalih
ID: 6399730
and what about the points ????? 0 points
0
 
LVL 3

Expert Comment

by:andysalih
ID: 6399735
have a look at the code provided on these threads, ive enclosed discriptions aswell. Don't expect a huge responce to your question where you havent posted any points.


THIS IS AN EXAMPLE OF HOW YOU CAN DO A SIMPLE TABLE WITH DATA, SO YOU CAN NOT USE THE FREEFILE() , YOU CAN MAKE MSFLEX GRID, TEXT BOX,COMBO BOX ETC WITH THIS CODE, AND IS SO EASY, TRY IT, PLEASE DONT FORGET TO VOTE FOR ME THANKS.....

http://www.planetsourcecode.com/xq/ASP/txtCodeId.25311/lngWId.1/qx/vb/scripts/ShowCode.htm




Ever wanted to have drop down combo boxes, list boxes, or check boxes in a MS FlexGrid? Well with this code you can now do it. With the code you can see how to do it for your own projects. You can add or take out what you need for your program. All you ne ...(description truncated)(ScreenShot)

http://www.planetsourcecode.com/xq/ASP/txtCodeId.10392/lngWId.1/qx/vb/scripts/ShowCode.htm



With the wsValidate ActiveX-DLL you can validate the user input if a field should lost focus or if the current recordset should change. If you set cancel=true in the 'Validate' event, the input field will not lost focus and the current recordset will not ...(description truncated)

http://www.planetsourcecode.com/xq/ASP/txtCodeId.6582/lngWId.1/qx/vb/scripts/ShowCode.htm
0
 
LVL 3

Accepted Solution

by:
andysalih earned 50 total points
ID: 6399739
this one is exactly what you want


Ever wanted to have drop down combo boxes, list boxes, or check boxes in a MS FlexGrid? Well with this
code you can now do it. With the code you can see how to do it for your own projects. You can add or
take out what you need for your program. All you ne ...(description truncated)(ScreenShot)

http://www.planetsourcecode.com/xq/ASP/txtCodeId.10392/lngWId.1/qx/vb/scripts/ShowCode.htm

have a look at the above link, its even got a screen shot for you to look at, that says it all, combo box in a flexgrid.

full source code provided, so you could build off it.

cheers
Andy
0
 
LVL 1

Expert Comment

by:harsh008_k
ID: 6399755
i will send u code,which i have dine
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Expert Comment

by:harsh008_k
ID: 6399758

pass the gridnaME
Call InitializeGrid(fgrdNAME, 2,4, "cOL hEADER0", "ColHeader1", "ColHeader2", "ColHeader3")

Call SetCellSize(fgrNAME, 2000, 1300, 1000, 1000)

Call PlaceSpecificControlInGridCell(fgrdname, 1, 1, combo1)

'put this in a bas module

Public Sub InitializeGrid(grd As MSFlexGrid, nrows As Integer, ncols As Integer, ParamArray colnames() As Variant)
''To Initialize Flex Grid
Dim i As Integer
With grd
    .Rows = nrows
    .Cols = ncols
    .FixedCols = 0
    .Row = 0
    For i = 0 To UBound(colnames)
    .Col = i
    .Text = colnames(i)
    Next i
End With
End Sub


'this procedure has to be used after InitilizeGrid function
Public Sub SetCellSize(grd As MSFlexGrid, ParamArray size() As Variant)
Dim colcount As Integer
Dim i As Integer
colcount = grd.Cols
With grd
    For i = 0 To UBound(size)
    .Col = i
    .ColWidth(i) = CInt(size(i))
    Next i
End With

End Sub

Public Sub PlaceSpecificControlInGridCell(grd As MSFlexGrid, rowno As Integer, colno As Integer, ctlname As Control)
'this procedure is used to place control in a cell specified in particular column


    With grd
                 If TypeOf ctlname Is Control Then
                    .Row = rowno
                    .Col = colno
                    ctlname.Left = .Left + .CellLeft
                    ctlname.Top = .Top + .CellTop
                    ctlname.Width = .CellWidth
                    If TypeOf ctlname Is CheckBox Or TypeOf ctlname Is OptionButton Then
                        ctlname.BackColor = .BackColor
                    End If
                End If
    End With

End Sub

0
 
LVL 1

Expert Comment

by:harsh008_k
ID: 6399760
*********U have not set the points*******
0
 
LVL 3

Expert Comment

by:andysalih
ID: 6399876
i think he will know that from my first comment !!!
0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6400162
Hi, look at this:

http://support.microsoft.com/support/kb/articles/Q201/1/97.asp
(HOWTO: Use a ComboBox to Enter Data into a FlexGrid Control)

Cheers
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now