Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hierarchy grid
Message
From
10/11/2003 12:09:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/11/2003 11:11:32
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00847806
Message ID:
00848386
Views:
14
I don't know. Maybe it's because Hflex doesn't use the source but copies it to an array of its own (TextMatrix).
It's easier to make it work with nonXML ADO recordset. Maybe it'd be faster to create tables from XML and then ADO to those tables.
Cetin


>It looks like it did not like my XML.
>I am testing with the one from MS sample and it’s fine now.
>But the program is dying at This.hflex.CollapseAll.
>FoxPro is using more and more memory till computer is not responding.
>Any idea?
>
>
>>>Has somebody had any luck with FlexGrid?
>>>If yes, can I populate it from XML file?
>>>
>>>Thanks, Mark
>>
>>Mark,
>>FWIW always use Hflexgrid not Flexgrid.
>>
>>#define XMLFile 'myXML.xml'
>>Local oRecordSet As ADODB.Recordset
>>Local oConn As ADODB.Connection
>>
>>strCn =	"Provider = MSDAOSP; Data Source=MSXML2.DSOControl.2.6;"
>>
>>oRecordSet = Createobject("adodb.recordset")
>>oConnection = Createobject("adodb.connection")
>>
>>With oConnection
>>  .Provider = "MSDataShape"
>>  .ConnectionString = strCn
>>  .Open
>>Endwith
>>
>>oRecordSet.Open(XMLFile,oConnection)
>>ShowMe('Contents',oRecordSet)
>>
>>Function ShowMe
>>Lparameters tcCaption,toRecordset
>>oForm = Createobject('myForm', tcCaption,toRecordset)
>>oForm.Show
>>Read Events
>>Endfunc
>>
>>Define Class myform As Form
>>  Height = 450
>>  Width = 750
>>  Name = "Form1"
>>
>>  Add Object hflex As OleControl With ;
>>    Top = 10, Left = 10, Height = 430, Width = 730, Name = "Hflex", ;
>>    OleClass = 'MSHierarchicalFlexGridLib.MSHFlexGrid'
>>
>>  Procedure Init
>>  Lparameters tcCaption,toRecordset
>>  This.Caption = tcCaption
>>  This.hflex.Datasource = toRecordset
>>  This.hflex.CollapseAll
>>Endproc
>>  Procedure QueryUnload
>>  Clear Events
>>Endproc
>>Enddefine
>>
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform