Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Nebula Grid: How to group columns when using GridTreeViewer?
Nebula Grid: How to group columns when using GridTreeViewer? [message #1385783] Wed, 11 June 2014 08:02 Go to next message
Marina Knieling is currently offline Marina KnielingFriend
Messages: 83
Registered: February 2013
Member
Hey guys,

I'm using GridTreeViewer and still like to group some columns because we
have a wide table with lots of numbers in the columns. Is this even
possible or would I have to use the "simple" GridItems?

Thanks for any hints
Marina Knieling
Re: Nebula Grid: How to group columns when using GridTreeViewer? [message #1385786 is a reply to message #1385783] Wed, 11 June 2014 08:14 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

If I'm not mistaken you could use it the following way:

GridTreeViewer v = new GridTreeViewer(parent);
{
GridColumn c = new GridColumn(v.getGrid(),SWT.NONE);
c.setText("Root-Col 1");
GridViewerColumn cv = new GridViewerColor(v,c);
}

GridColumnGroup g = new GridColumnGroup(v.getGrid(),SWT.NONE);
g.setText("Root-Col 2");
{
GridColumn c = new GridColumn(g,SWT.NONE);
c.setText("Sub col1");
GridViewerColumn cv = new GridViewerColor(v,c);
}

{
GridColumn c = new GridColumn(g,SWT.NONE);
c.setText("Sub col2");
GridViewerColumn cv = new GridViewerColor(v,c);
}

On 11.06.14 10:02, Marina Knieling wrote:
> Hey guys,
>
> I'm using GridTreeViewer and still like to group some columns because we
> have a wide table with lots of numbers in the columns. Is this even
> possible or would I have to use the "simple" GridItems?
>
> Thanks for any hints
> Marina Knieling
Re: Nebula Grid: How to group columns when using GridTreeViewer? [message #1385801 is a reply to message #1385786] Wed, 11 June 2014 10:12 Go to previous message
Marina Knieling is currently offline Marina KnielingFriend
Messages: 83
Registered: February 2013
Member
Hi Tom,

thanks, works like a charm.

On 11.06.2014 10:14, Tom Schindl wrote:
> Hi,
>
> If I'm not mistaken you could use it the following way:
>
> GridTreeViewer v = new GridTreeViewer(parent);
> {
> GridColumn c = new GridColumn(v.getGrid(),SWT.NONE);
> c.setText("Root-Col 1");
> GridViewerColumn cv = new GridViewerColor(v,c);
> }
>
> GridColumnGroup g = new GridColumnGroup(v.getGrid(),SWT.NONE);
> g.setText("Root-Col 2");
> {
> GridColumn c = new GridColumn(g,SWT.NONE);
> c.setText("Sub col1");
> GridViewerColumn cv = new GridViewerColor(v,c);
> }
>
> {
> GridColumn c = new GridColumn(g,SWT.NONE);
> c.setText("Sub col2");
> GridViewerColumn cv = new GridViewerColor(v,c);
> }
>
> On 11.06.14 10:02, Marina Knieling wrote:
>> Hey guys,
>>
>> I'm using GridTreeViewer and still like to group some columns because we
>> have a wide table with lots of numbers in the columns. Is this even
>> possible or would I have to use the "simple" GridItems?
>>
>> Thanks for any hints
>> Marina Knieling
>
Previous Topic:How to set background image for whole nattable
Next Topic:tool tip
Goto Forum:
  


Current Time: Fri Apr 19 19:56:50 GMT 2024

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

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

Back to the top