Jump to content

Treeview Columns / Master Detail in ONE grid


PaulEhv

Recommended Posts

Hi,

The last thing i must figure out before we buy UniGUI, is a way to get treeview working with columns

or simulate a view like that.

 

Currently i use this in FMX :

 TMSFMXTreeView1.Columns.Add.Text := 'Product';
 TMSFMXTreeView1.Columns.Add.Text := 'Color';

 TMSFMXTreeView1.Columns[0].width := 175;
 TMSFMXTreeView1.Columns[1].width := 140;

 

Is such a thing also possible with UniGUI desktop ?

 

I tried to simulate it by using a HTML Table as Caption of the Treeview, but for

some reason it places the HTML Table below the node as caption, instead of next to it.

 

https://imgshare.io/image/html.z8VSf

Code :

UniTreeView1.Items.AddChild(Prn, trim('<table><tbody><tr><td>One</td><td>Two</td><td>Three</td><td>Four</td></tr></tbody></table>'));

 

If this isn;t possibe with UniGUI, then there is another way to get done what i need

and that is Master / Detail DBGrid in ONE, that way i can simulate the view per row.

 

I read in an older post that Master / Detail in ONE grid was expected in Version 1.1,

but it's not there yet, right ?  

 

I saw also the row widget example, but it's not as fast and responsive, as it creates

the view on each expand.

 

Thanks for your time.

 

 Paul

Link to comment
Share on other sites

3 hours ago, PaulEhv said:

The last thing i must figure out before we buy UniGUI, is a way to get treeview working with columns

Hello,

Thank you for your interest in UniGUI.

Can you use UniDBTreegrid?

\FMSoft\Framework\uniGUI\Demos\Desktop\Grid - DBTreeGrid

 

Link to comment
Share on other sites

Hi,

I saw the Treegirid demo too and it looks promissing, but i only miss the option to place

values / text in these "column header" boxes, see url :

https://imgshare.io/image/col2.zWgAF

(Edited in Paint, see red circles with BOLD values)

Is there a way to get values in the "gouped header" columns ?

 

Thanks !

 

Paul

Edited by PaulEhv
More clear image
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Hi,

Sorry for the late answer, two of my colleagues were absent.

Currently i use this in FMX, small example :

procedure TForm21.Button4Click(Sender: TObject);
var
 n, pn: TTMSFMXTreeViewNode;
begin
    while not sq_detail.eof do
     begin

        pn := TMSFMXTreeView3.Nodes.Add;

        pn.text[0]                  :=  Trim(sart);


        pn.CollapsedIcons[0, False] :=  TMSFMXBitmapContainer2.Items.Items.Bitmap;
        pn.ExpandedIcons[0, False]  :=  TMSFMXBitmapContainer2.Items.Items.Bitmap;

        pn.text[1] := trim(scolor);
        pn.text[2] := trim(sConfirmed);
        pn.text[3] := trim(sAmount);

        pn.text[4] := trim(sPrice);
 

        while not r_order.Eof do
         begin

          n := TMSFMXTreeView3.AddNode(pn);
          n.Text[3] := trim(smeters);
          n.Text[4] := trim(slocation);

          n.Text[5] := trim(sid);

          r_order.Next;

         end;

        inc(i);
        sq_detail.next;

     end;
end;
 

See screenshot below for example result :

https://imgshare.io/image/treeviewcolums.Nrd7Nx

 

As you can see i work with columns with the Treeview.

Is this also possible with UniGUI creating columns in a treeview  ?

 

If not, is there an other way to simulate colums with expandable nodes ?

As far as i can see, current Treeview can only add Nodes / Subnodes without columns.

Thanks.

 

Paul

Link to comment
Share on other sites

  • 2 weeks later...
On 5/2/2020 at 4:39 PM, PaulEhv said:

I saw the Treegirid demo too and it looks promissing, but i only miss the option to place

values / text in these "column header" boxes, see url :

Hello,

Please clarify again what is the problem when using UniDBTreeGrid?

Link to comment
Share on other sites

2 hours ago, PaulEhv said:

Any news ?

Hi,

Sorry for the late response. I am very sorry, but it seems I do not fully understand your question.

On 5/2/2020 at 8:16 AM, PaulEhv said:

The last thing i must figure out before we buy UniGUI, is a way to get treeview working with columns

I will try to analyze it.

Link to comment
Share on other sites

Hi Sherzod,

If columns are available in Treeview, we can set our own values per node.

I'm sorry that i can't be any more clear in what my intentions are, but in short

is that we need to be able to set our own values.

 

From the screenshot, IF we use UniDBTreeGrid, can we set our own values in

the spaces NEXT to the currently empty fields of "Bahamas" ? 

https://imgshare.io/image/ui.NwKLfw

 

If Columns and Treeview is possible in the future, like the TMS FMX treeview, then

we can use Treeview for our solution.

 

Thanks.

 

Paul 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...