Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Simple Cell Editing
Simple Cell Editing [message #1053708] Tue, 07 May 2013 06:43 Go to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Hi,
I'm tinker with this problem since a couple of hours and even if it's so basic, I can't get it working.
So all I need is a simple Text(Cell)Editor for selected cells and maybe a check an input check (so that only numbers can be put in).

This is the code:
dataProvider = new DataProvider();
		final ViewportLayer layer = new ViewportLayer( new DataLayer(dataProvider) );
		
		
		IConfigLabelAccumulator cellLabelAccumulator = new IConfigLabelAccumulator() {
			
			public void accumulateConfigLabels(LabelStack configLabels, int columnPosition, int rowPosition) {
				
					configLabels.addLabel("myCellLabel"); 
					
				} 
			};
		layer.setConfigLabelAccumulator(cellLabelAccumulator);
		
		
		
		

		
		natTable = new NatTable(container, layer, false);
		natTable.addConfiguration(new AbstractRegistryConfiguration() {
			public void configureRegistry(IConfigRegistry configRegistry) {
				TextCellEditor textCellEditor = new TextCellEditor();
				configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR, textCellEditor, DisplayMode.EDIT, "myCellLabel");
				//configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
				
				
				
			}
			
			
		});

		
		
		
		natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
		natTable.configure();




Neither of the "configRegistry.registerConfigAttribute(..)" functions work. What did I do wrong?

Re: Simple Cell Editing [message #1053717 is a reply to message #1053708] Tue, 07 May 2013 07:28 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1213
Registered: July 2012
Senior Member
The label mechanism is the way to configure things for special cases. What you want to do is to configure that all cells are always editable.

a) you need to enable editing by editing rule. you commented it so there is nothing editable
b) as you are not using the GridLayer, the configuration of the handlers and bindings are missing. You need the configurations as expressed in DefaultEditConfiguration and DefaultEditBindings.
c) you don't need the labels in your case so you can get rid of the IConfigLabelAccumulator
Re: Simple Cell Editing [message #1053718 is a reply to message #1053717] Tue, 07 May 2013 07:29 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1213
Registered: July 2012
Senior Member
Oh, you could of course simply add the DefaultEditBindings as configuration to your NatTable, but then you will need to set the region label of the viewport to GridRegion.BODY
Re: Simple Cell Editing [message #1053938 is a reply to message #1053718] Wed, 08 May 2013 03:36 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:
http://www.imgbox.de/users/public/images/SYoXmW16e9.jpg
I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:
layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());

as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1053939 is a reply to message #1053718] Wed, 08 May 2013 03:37 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:
http://www.imgbox.de/users/public/images/SYoXmW16e9.jpg
I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:
layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());

as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1053960 is a reply to message #1053718] Wed, 08 May 2013 03:36 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1053961 is a reply to message #1053718] Wed, 08 May 2013 03:37 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1053982 is a reply to message #1053718] Wed, 08 May 2013 03:36 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1053983 is a reply to message #1053718] Wed, 08 May 2013 03:37 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054006 is a reply to message #1053718] Wed, 08 May 2013 03:36 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054007 is a reply to message #1053718] Wed, 08 May 2013 03:37 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054030 is a reply to message #1053718] Wed, 08 May 2013 03:36 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054031 is a reply to message #1053718] Wed, 08 May 2013 03:37 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054033 is a reply to message #1053718] Wed, 08 May 2013 04:02 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:
http://www.imgbox.de/users/public/images/SYoXmW16e9.jpg
I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:
layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());

as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054059 is a reply to message #1053718] Wed, 08 May 2013 03:36 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054060 is a reply to message #1053718] Wed, 08 May 2013 03:37 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054088 is a reply to message #1053718] Wed, 08 May 2013 03:36 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054089 is a reply to message #1053718] Wed, 08 May 2013 03:37 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054091 is a reply to message #1053718] Wed, 08 May 2013 04:02 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054118 is a reply to message #1053718] Wed, 08 May 2013 03:36 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054119 is a reply to message #1053718] Wed, 08 May 2013 03:37 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054121 is a reply to message #1053718] Wed, 08 May 2013 04:02 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054150 is a reply to message #1053718] Wed, 08 May 2013 03:36 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054151 is a reply to message #1053718] Wed, 08 May 2013 03:37 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054153 is a reply to message #1053718] Wed, 08 May 2013 04:02 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054184 is a reply to message #1053718] Wed, 08 May 2013 03:36 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054185 is a reply to message #1053718] Wed, 08 May 2013 03:37 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054187 is a reply to message #1053718] Wed, 08 May 2013 04:02 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054221 is a reply to message #1053718] Wed, 08 May 2013 03:36 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054222 is a reply to message #1053718] Wed, 08 May 2013 03:37 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054224 is a reply to message #1053718] Wed, 08 May 2013 04:02 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054259 is a reply to message #1053718] Wed, 08 May 2013 03:36 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054260 is a reply to message #1053718] Wed, 08 May 2013 03:37 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054262 is a reply to message #1053718] Wed, 08 May 2013 04:02 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054296 is a reply to message #1053718] Wed, 08 May 2013 03:36 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054297 is a reply to message #1053718] Wed, 08 May 2013 03:37 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054299 is a reply to message #1053718] Wed, 08 May 2013 04:02 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054335 is a reply to message #1053718] Wed, 08 May 2013 03:36 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054336 is a reply to message #1053718] Wed, 08 May 2013 03:37 Go to previous messageGo to next message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Re: Simple Cell Editing [message #1054338 is a reply to message #1053718] Wed, 08 May 2013 04:02 Go to previous messageGo to previous message
Aljoscha Steffens is currently offline Aljoscha Steffens
Messages: 302
Registered: November 2012
Senior Member
Thank you for the quick answer.
Just in case this changes your advises: This is just to test how editing works at all. What I'm eventually going to do (or what I want to achieve) is that only columns containing certain keywords are allowed to be edited.
For example I have a table with keywords like "measurement" , "time stamp" and "constant" as a keyword in the first row. And only those columns (or rather one cell in the column) with the keyword "constant" should be editable. So it should just be like this with just the red cell editable:

I would like to avoid columnHeaderLayer and rowHeaderLayers, thats why I chose the ViewPortLayer.
Now if I add:

layer.setRegionName(GridRegion.BODY);
configRegistry.registerConfigAttribute( EditConfigAttributes.CELL_EDITABLE_RULE, IEditableRule.ALWAYS_EDITABLE, DisplayMode.EDIT, "myCellLabel");
natTable.addConfiguration(new DefaultEditBindings());


it still doesn't work.
And if I add
natTable.addConfiguration(new DefaultEditConfiguration());
as well, I get an error saying:
"org.eclipse.nebula.widgets.nattable.NatTable cannot be cast to org.eclipse.nebula.widgets.nattable.layer.AbstractLayer"
(It gets thrown when I call natTable.configure)
Previous Topic:Update / refresh Nattable
Next Topic:Unable to get RowHideShowLayer from body layer stack of nattable.
Goto Forum:
  


Current Time: Fri Jul 25 13:45:35 EDT 2014

Powered by FUDForum. Page generated in 0.03961 seconds