DataGrid and EditTextCell in sub rows problem

2012-12-05 Thread Michael Vogt
Hello. I have EditTextCells in sub rows of a DataGrid, basically created like in the sample DataGrid. I just replace the TextCells in the sub rows with EditTextCells. There are two problems: - When entering edit mode in a

Re: DataGrid and EditTextCell in sub rows problem

2012-12-09 Thread Nicolas Morel
Hello, This is because the renderCell in AbstractCellTableBuilder is giving the same cellId to your root row cell and sub row cell. I had to do this for a project so I extracted what I did and put it in a sample here : https://github.com/nmorel/gwt-celltable-subrows I couldn't find a better so

Re: DataGrid and EditTextCell in sub rows problem

2012-12-09 Thread Nicolas Morel
And just after I wrote that, I found a way to do it without modify AbstractCellTableBuilder. The key here is to create a HasCell for each sub row containing the sub row value or an index to find it from the main row value. I made some helper classes for this like ChildCellColumn

Re: DataGrid and EditTextCell in sub rows problem

2012-12-10 Thread Michael Vogt
Hello Nicolas. Thank you for your answer. Very helpful. I came up with a slightly different solution (for now). I created a subclass of a column, and overrode the onBrowserEvent() call. There I receive the context with the subIndex, which is 0 when the root cell was edited, and reflects the s