| 
| Re: Nebula Grid: How to group columns when using GridTreeViewer? [message #1385786 is a reply to message #1385783] | 
Wed, 11 June 2014 04:14    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 06:12   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 
>
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.20370 seconds