DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: combo box in data grid

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    combo box in data grid

    [Originally posted by nykhol]

    can anyone please help me how to make the data appear on the combo box which is a column in a data grid?i need the code please. The list will come from my back end---access.tnx

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re: combo box in data grid

    [Originally posted by 10Tec Company]

    Did you see our iGrid control? Visit www.10Tec.com for more detailed information.

  3. #3
    Join Date
    Aug 2004
    Posts
    43,023

    Re: combo box in data grid

    [Originally posted by K.Ikaunieks]

    try placing a combobox on a form and off the grid
    set the index property to 0 set the visible property to false.

    You will need to replace the code:-

    For y = 1 To 5
    ˙ Combo1(1).AddItem y
    Next y
    ˙ ˙ ˙ ˙
    with recordset looping code

    Run the following code from the formload event.


    Dim y As Integer

    MSFlexGrid1.Cols = 20
    MSFlexGrid1.Rows = 20
    ˙
    ˙ ˙ ˙
    ˙ ˙ ˙
    ˙ MSFlexGrid1.Row = 1
    ˙
    ˙ ˙
    ˙ ˙ ˙ ˙ ˙ MSFlexGrid1.Col = 1
    ˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙
    ˙ ˙ ˙ ˙
    ˙ ˙ ˙ ˙ 'Add the new combobox on the form
    ˙ ˙ ˙ ˙ Load Combo1(1)
    ˙ ˙ ˙ ˙
    ˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙ ˙
    ˙ ˙ ˙ ˙ For y = 1 To 5
    ˙ ˙ ˙ ˙ Combo1(1).AddItem y
    ˙ ˙ ˙ ˙ Next y
    ˙ ˙ ˙ ˙
    ˙ ˙ ˙ ˙ Combo1(1).ListIndex = 0
    ˙ ˙ ˙
    ˙ ˙ ˙ ˙ '˙ Position the combobox on the˙ flexgrid's cell
    ˙ ˙ ˙ ˙ With Combo1(1)
    ˙ ˙ ˙ ˙ ˙ ˙ .Top = MSFlexGrid1.Top + MSFlexGrid1.CellTop
    ˙ ˙ ˙ ˙ ˙ ˙ .Left = MSFlexGrid1.Left + MSFlexGrid1.CellLeft
    ˙ ˙ ˙ ˙ ˙ ˙ .Width = MSFlexGrid1.CellWidth
    ˙ ˙ ˙ ˙ ˙ ˙ .Visible = True
    ˙ ˙ ˙ ˙ ˙ ˙
    ˙ ˙ ˙ ˙ ˙ ˙ Combo1(1).ZOrder 0 'Bring item to front
    ˙ ˙ ˙ ˙ End With
    ˙ ˙

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center