DBCombo in DBGrid? 
Author Message
 DBCombo in DBGrid?

Is it possible to make a DBGrid cell as a DBCombo?
Thanks!


Tue, 05 Jun 2001 03:00:00 GMT  
 DBCombo in DBGrid?
Bojan,

The dbgrid.ocx that comes with VB does not support this feature.  This
easiest way to accomplish this would be to use another control such as the
True Grid or Sheridan Grid control.  

Another way, which is my favorite, is to program the effect yourself using
a combobox and the msflexgrid.ocx.  The msflex grid has properties
indicating the X,Y location of each cell as well as the height and width of
each cell.  All that is necessary is to move the combobox to the given
location whenever you enter a combobox cell.  Below is an example EnterCell
event:

Private Sub MSFlexGrid1_EnterCell()
        Combo1.Left = MSFlexGrid1.CellLeft
        Combo1.Top = MSFlexGrid1.CellTop
        Combo1.Width = MSFlexGrid1.CellWidth
        'Note that the Height of a combobox is readonly so you will need to set
the     'height of each grid row as needed.
End Sub

Also, try to use the standard combobox if possible.  This can save memory
since you will not be loading the dbcombo.ocx.

Good luck and I hope this helps,

Chris Bristow



Quote:
> Is it possible to make a DBGrid cell as a DBCombo?
> Thanks!



Tue, 05 Jun 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Combining dbcombo and DBgrid ?

2. dbcombo in dbgrid

3. data in dbcombo to dbgrid

4. DBCombo into DBGrid?

5. DBCombo in DBGrid cell

6. How do I put a DBCombo a DBgrid?

7. DBCombo in DBGrid v5.0 std edition

8. linking dbcombo to dbgrid

9. DBcombo-DBlist-DBgrid that follows input

10. DBCombo box inside DBGrid??

11. Inserting a DBCombo or Check box in a DBGrid control

12. DBCombo Box from DBGrid and Multiple fields in Combolistbox

 

 
Powered by phpBB® Forum Software