Skip to main content
1-Visitor
Apr 27, 2020 3:25 AM UTC
Solved

Grid view with merge headers

I've currently have a task to create a grid view with sub headers like a picture bellow. I've struggled with this for few days but haven't got any clue to custom girdview header like this. Can anyone give me any ideas to handle that. Thanks alot!Annotation 2020-04-27 102319.png

18-Opal
Apr 27, 2020 10:07 AM UTC

Hello @quangnguyenduc4,

 

I can suggest four alternatives, all of which are bad, but in different ways:

  1. Wait for PTC to implement this merging;
  2. Customize Advanced Grid widget or implement your own grid from scratch;
  3. Collection widget in "Table" mode might be able to help;
  4. Create a service returning a table as HTML and render it using HtmlTextArea widget;
  5. Export data to Excel and group cells on POI level (you'll need to write a custom Java extension for that too);

All of those options (except for (1)) are either just ugly or complex and ugly. Option (4) will probably bring you the highest value in the long-term perspective, but it requires some development. At least, that's what I usually do when the users need some advanced grid operations (grouping, merging, filtering, formatting, etc.) -- then I just say "You will use web interface to preview the data, and you'll be able to click "Export to Excel" to get the actual grid".

 

Regards,
Constantine

6 replies

1-Visitor
Apr 27, 2020 8:10 AM UTC

I don't think you will be able to do nothing like this with the standard neither with the advanced (https://marketplace.ptc.com/apps/247648/grid-advanced---version-421#!overview) grid widget.

Translate
18-Opal
Apr 27, 2020 10:07 AM UTC

Hello @quangnguyenduc4,

 

I can suggest four alternatives, all of which are bad, but in different ways:

  1. Wait for PTC to implement this merging;
  2. Customize Advanced Grid widget or implement your own grid from scratch;
  3. Collection widget in "Table" mode might be able to help;
  4. Create a service returning a table as HTML and render it using HtmlTextArea widget;
  5. Export data to Excel and group cells on POI level (you'll need to write a custom Java extension for that too);

All of those options (except for (1)) are either just ugly or complex and ugly. Option (4) will probably bring you the highest value in the long-term perspective, but it requires some development. At least, that's what I usually do when the users need some advanced grid operations (grouping, merging, filtering, formatting, etc.) -- then I just say "You will use web interface to preview the data, and you'll be able to click "Export to Excel" to get the actual grid".

 

Regards,
Constantine

Translate
18-Opal
Apr 27, 2020 10:10 AM UTC

I forgot to mention another option, which also works well for some of my customers -- embed some BI solution like Tableau or QlikView in a mashup and move all grids (and data visualization) there.

Translate
1-Visitor
Apr 27, 2020 10:41 AM UTC

Hi Constantine,

 

I'm curious in this option (embed BI), how easy to query TW services and alike from thouse BI tools it's? or you have to build especial connectivity services and alike?

Translate