David Posted June 26, 2014 Posted June 26, 2014 Hello everybody, I want to show my data in a TTreeDBGrid or TuniTreeDBGrid.But I can not find the component.Do you have the component to meet my need? Or can you give me some advices? Thank you very much. Quote
Sherzod Posted June 26, 2014 Posted June 26, 2014 Hi David. Try to understand these examples... http://dev.sencha.com/deploy/ext-4.0.1/examples/tree/treegrid.html http://jsfiddle.net/8JmqL/10/ Sincerely. Quote
David Posted June 27, 2014 Author Posted June 27, 2014 Hi Delphi Developer, I see the your samples,but I still know how to use in uniGUI,Would you give me more informations or samples using the js in uniGUI? Thanks Quote
NelsonFS Posted June 27, 2014 Posted June 27, 2014 This code works for me. try to adapt it. You must create a table like: Id, Description, IdFather hope that helps. procedure CreateTreeViewFromTable; var iFather, iLast: TUniTreeNode; FatherCreated: Integer; begin Qry.First; FatherCreated := -1; while not Qry.Eof do begin if (FatherCreated <> QryIDFather.AsInteger) then begin if QryID.AsInteger = QryIDFather.AsInteger then iFather := TreeView1.Items.Add(nil, QryDESCRIPTION.AsString) else iFather := TreeView1.Items.AddChild(iLast, QryDESCRIPTION.AsString); FatherCreated := QryID.AsInteger; Qry.Next; end else begin while (not Qry.Eof) and (FatherCreated = QryIDFather.AsInteger) do begin iLast := TreeView1.Items.AddChild(iFather, QryDESCRIPTION.AsString); Qry.Next; end; end; end; end; Quote
David Posted June 28, 2014 Author Posted June 28, 2014 Thanks NelZ, But I still know how to show the data in a TreeGrid, not in a TreeView. Would you kindly to show me? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.