Skip to main content



      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 12:34 Go to next message
Eclipse UserFriend
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 12:47] by 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 15:31 Go to previous message
Eclipse UserFriend
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: Sun Jun 15 02:57:19 EDT 2025

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

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

Back to the top