Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Group By for Tree grid(Facing problem in group by feature for tree grid)
icon9.gif  Group By for Tree grid [message #1339264] Wed, 07 May 2014 15:49 Go to next message
Suresh Chamuah is currently offline Suresh ChamuahFriend
Messages: 11
Registered: May 2014
Location: Bangalore
Junior Member
Hi All,

A very good evening....
Well I am using nattable from last one year and using mostly all features.
Currently, I am using the tree grid feature and build my own TreeList.Format and successfully able to render the Parent-Children. Then I implemented the GROUPBY feature. Here I faced a major issue in GroupByTreeFormat because the GroupByDataLayer needs the treelist and my treelist has a custom treelist.format.
I can able to groupby the columns but cannot render the children since treelist format is now GroupByTreeFormat.

Can you please guide me if I am doing anything wrong.

Thanks,
Chamuah Suresh
Re: Group By for Tree grid [message #1339773 is a reply to message #1339264] Wed, 07 May 2014 20:51 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2495
Registered: July 2012
Senior Member
I don't understand what you are trying to achieve. You know that the groupby feature is implemented that the grouping is shown as tree structure? What is your intended behaviour by applying groupby to a already build up tree?
Re: Group By for Tree grid [message #1341913 is a reply to message #1339773] Thu, 08 May 2014 18:15 Go to previous messageGo to next message
Suresh Chamuah is currently offline Suresh ChamuahFriend
Messages: 11
Registered: May 2014
Location: Bangalore
Junior Member
Yes. My intend to have the tree implementation was because of group by feature returns the parent as group by object and for my initial tree list I need to have parent and children both as my domain object not as group by object.
For ex

Header 1 Header 2
>Scenario 1
Scenario 1.1 Very high
Scenario 1.2 Very high
Scenario 1.3 Low

Here in my initial implementation scenario 1 and it's descendants are the domain objects but if I would implemented group by, scenario 1 would have group by object.

Now I have the treelist, a tree model and tree format. Can I achieve group by feature without losing my own implementation.

Re: Group By for Tree grid [message #1342112 is a reply to message #1341913] Thu, 08 May 2014 20:13 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2495
Registered: July 2012
Senior Member
You want to add additional tree levels via GroupBy?

Never thought of such a scenario. You would need to check if you can set a tree format that extends the group by one. Not sure if this would work in the current architecture.
icon10.gif  Re: Group By for Tree grid [message #1349558 is a reply to message #1342112] Mon, 12 May 2014 08:43 Go to previous messageGo to next message
Suresh Chamuah is currently offline Suresh ChamuahFriend
Messages: 11
Registered: May 2014
Location: Bangalore
Junior Member
Hi,

Thanks for the help, I got the solution. I wrote my own customgroupbyLayer which takes custom tree.format and comparator. Great it actually work.

I have attached the screen shot.

Thank you.
Re: Group By for Tree grid [message #1349967 is a reply to message #1349558] Mon, 12 May 2014 12:39 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2495
Registered: July 2012
Senior Member
I still don't see the need for groupBy as your screenshot does not show the GroupBy area, but if it works for you everything is fine. Smile

Great to see you are using the new modern theme. Smile
Re: Group By for Tree grid [message #1350114 is a reply to message #1349967] Mon, 12 May 2014 14:02 Go to previous messageGo to next message
Suresh Chamuah is currently offline Suresh ChamuahFriend
Messages: 11
Registered: May 2014
Location: Bangalore
Junior Member
Actually Instead of using the composite layer and adding groupbyheardermenuconfiguration to achieve drag and drop columns, I have implemented popup action. In my application the composite area would have look bad in terms of UI because I have some action items also to be provide above. And in my kind of application string column group by doesn't make any sense so only list type, Boolean type and date type columns are allowed to group by through pop up menu check actions which is right now I am developing.

Thanks and Regards,
Suresh Chamuah
Re: Group By for Tree grid [message #1368580 is a reply to message #1350114] Tue, 20 May 2014 07:23 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2495
Registered: July 2012
Senior Member
Quote:
I wrote my own customgroupbyLayer which takes custom tree.format and comparator


After thinking of this, that might be interesting for other users too. Wouldn't it be possible to create a additional constructor in the NatTable GroupByLayer that takes these parameters? In that case your solution could become part of NatTable itself.

Would be great to see such a contribution. It would be also awesome to see an example then.
Re: Group By for Tree grid [message #1372340 is a reply to message #1368580] Wed, 21 May 2014 19:56 Go to previous messageGo to next message
Suresh Chamuah is currently offline Suresh ChamuahFriend
Messages: 11
Registered: May 2014
Location: Bangalore
Junior Member
I will be grateful to you if I can contribute this to the community. I will definitely post you the complete patch or if possible the demo application. My team is testing it in all possible ways, as soon as they say good to go, I will provide you the deliverables.
I also want you to know that I have also create a patch for my application called as NatTableEditSupport, it's soul propose is to provide any kind of editor to column with it's validator, filter editor, and filter category and is highly customisable and it's implementation is as simple as jface cell editor.
I have a point to make, if I consider my entire look on nattable I found it work awesome on the static data but fails on dynamic data not in terms of rows but on columns. In tree implementation I need to pass the children, we need to write a format basically content provider to fetch the parent which I feel is opposite and kill the partial lazy loading for ex when user expand the parent children loads, this will end up modifying the input list which need to pass it to the tree.
I feel nattable should be loosely integrate with glaze list. It has it's know problem I mean to say let's leave the implementation on to developers.

Thank you so much for giving me this privilege, I will post you soon with updates.

Suresh Chamuah
Re: Group By for Tree grid [message #1373553 is a reply to message #1372340] Thu, 22 May 2014 08:09 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2495
Registered: July 2012
Senior Member
Quote:
NatTableEditSupport, it's soul propose is to provide any kind of editor to column with it's validator, filter editor, and filter category


I can have a look at it if you like to contribute. It sounds like some wrapper to make it easier to configure editing.

Quote:
if I consider my entire look on nattable I found it work awesome on the static data but fails on dynamic data not in terms of rows but on columns


I disagree with that. If you need dynamic columns you need to implement a IDataProvider that can handle that. While rows are typically items in a collection, columns are not as they are usually item properties. NatTable supports different row/column definitions, but you need to take care of that yourself. There is even an example for dynamic columns in the examples app.

Quote:
I feel nattable should be loosely integrate with glaze list. It has it's know problem I mean to say let's leave the implementation on to developers.


If you don't like GlazedLists, don't use it. All features in NatTable can be implemented using different list implementations. The interfaces can all be found in the core package. That's why the GlazedLists support is in an extension package! So it is loosely coupled. We just provide some default implementations based on GlazedLists. The only exception to that is the groupby feature, which is currently only implemented using GlazedLists.
Previous Topic:A selection model that preserves selection during resort?
Next Topic:Adding SWT DragSource support without breaking NatTable DragMode?
Goto Forum:
  


Current Time: Fri Sep 22 13:45:58 GMT 2017

Powered by FUDForum. Page generated in 0.03254 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software