Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » CellEditor isn't exactely in the appropriate nattable Cell after commiting the first edition
CellEditor isn't exactely in the appropriate nattable Cell after commiting the first edition [message #1707430] Fri, 04 September 2015 16:34 Go to next message
Mohamed SADI is currently offline Mohamed SADIFriend
Messages: 38
Registered: December 2013
Member
Hello, i am trying to create an editable Nattabale, i've create it successfully by following this code _812_EditableGroupBySummarySummaryRowExample, if i do a mouse click on the cell every think work fine but when i press key down or key up, the cell editor of the next cell isn't positioned correctely (on the top not in the cell).
can you help me?
Thanks in advance.

this my code :
compositeGridLayer.addConfiguration(new EditorConfiguration());
compositeGridLayer.addConfiguration(new DefaultEditBindings());
compositeGridLayer.addConfiguration(new DefaultExportBindings());
compositeGridLayer.addConfiguration(new DefaultPrintBindings());



the class EditorConfiguration :
 class EditorConfiguration extends AbstractRegistryConfiguration {

        @Override
        public void configureRegistry(IConfigRegistry configRegistry) {
            configRegistry.registerConfigAttribute(
                    EditConfigAttributes.CELL_EDITABLE_RULE,
                    IEditableRule.ALWAYS_EDITABLE);

            registerEditors(configRegistry);
        }
        
        
}


the methode registerEditors(configRegistry) :
	public void registerEditors(IConfigRegistry configRegistry2) {
		// TODO Auto-generated method stub
		
		configRegistry.registerConfigAttribute(
                CellConfigAttributes.CELL_PAINTER,
                new TextPainter(),
                DisplayMode.NORMAL,
                "myColumn");
				configRegistry.registerConfigAttribute(
		                EditConfigAttributes.CELL_EDITABLE_RULE,
		                IEditableRule.ALWAYS_EDITABLE);

				   configRegistry.registerConfigAttribute(
		                   EditConfigAttributes.CELL_EDITOR,
		                   new TextCellEditor(true, true),
		                   DisplayMode.NORMAL,
		                   "myColumn");

		           // configure to open the adjacent editor after commit
		           configRegistry.registerConfigAttribute(
		                   EditConfigAttributes.OPEN_ADJACENT_EDITOR,
		                   Boolean.TRUE,
		                   DisplayMode.EDIT,
		                   "myColumn");

		           // configure a custom message for the multi edit dialog
		           Map<String, Object> editDialogSettings = new HashMap<String, Object>();
		           editDialogSettings.put(ICellEditDialog.DIALOG_MESSAGE, "Please specify the lastname in here:");

		           configRegistry.registerConfigAttribute(
		                   EditConfigAttributes.EDIT_DIALOG_SETTINGS,
		                   editDialogSettings,
		                   DisplayMode.EDIT,
		                   "myColumn");

	}





index.php/fa/23148/0/

[Updated on: Fri, 04 September 2015 16:47]

Report message to a moderator

Re: CellEditor isn't exactely in the appropriate nattable Cell after commiting the first edition [message #1707457 is a reply to message #1707430] Fri, 04 September 2015 19:31 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
The reason for this is typically that the InlineEditEventHandler is registered to the wrong layer. Mostly too low in the layer stack.
Previous Topic:Nattable column and row resize behaviour
Next Topic:Clear All records in nattable and reload others
Goto Forum:
  


Current Time: Thu Apr 25 04:30:55 GMT 2024

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

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

Back to the top