John Morris
10-05-2001, 06:34 AM
Which reference do I need to select to allow the use of the MSH flex grid
How do I then populate the grid with a data from a recordset created on the press of a button.
Thanks
Banjo
10-05-2001, 06:36 AM
Its listed as "Microsoft Hierarchical FlexGrid Control".
I'm afraid I don't know the answer to your second question.
1) Under Project_Components Select Microsoft Hierarchical Flex Grid.
2) If you want to use the control in the bound mode then you also need to select a connection type, ie ADO/DAO and make certain that the proper references are selected. Next you need to set the connection string to the database that you want to access. Next select the table or Query that you want to retrieve your data from.
Alternately, you can fill the Flexgrid manually from any datasource that you like using any of several methods like the .TextMatrix.
If you want to be able to edit the data I might suggest using the Data Bound Grid control instead of the flexgrid. To edit data in a flexgrid requires a fair amount of coding.
LOL
Hunter
Thinker
10-05-2001, 08:41 PM
For the answer to your second question, all you need to do is assign an
open, ADO Recordset to the DataSource or Recordset properties of the
MSHFG control.
I think therefore I am... sometimes right. images/icons/wink.gif
dhone
10-06-2001, 01:23 PM
if you are using unbounded controls. then it's easy to populate. You can do it manually.
ex.
set recordset = ("select * from YOURTABLE)
recordset.movefirst
while recordset.eof = false
' put your data here
'grid.........
recordset.movenext
wend
but if you're using bounded controls. then look for a bounded grid. why dont you use dbgrid instead?
iamtgo3
10-06-2001, 01:52 PM
I have an example of what you are trying to do here..
http://www.ipdg3.com/sourcecoderesults.php?option=sourcecode&id=000059
http://www.ipdg3.com/sourcecoderesults.php?option=sourcecode&id=000143
Hope it helps..
George, IPDG3
www.IPDG3.com