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<https://github.com/nmorel/gwt-celltable-subrows/blob/master/src/main/java/com/github/nmorel/gwt/celltable/subrows/client/celltable/ChildCellColumn.java>
.
MyDefaultCellTableBuilder<https://github.com/nmorel/gwt-celltable-subrows/blob/master/src/main/java/com/github/nmorel/gwt/celltable/subrows/client/celltable/MyDefaultCellTableBuilder.java>
 is 
just a copy of the DefaultCellTableBuilder with a protected scope on style.

The custom builder is 
SubrowTableBuilder<https://github.com/nmorel/gwt-celltable-subrows/blob/master/src/main/java/com/github/nmorel/gwt/celltable/subrows/client/SubrowTableBuilder.java>
.

Le dimanche 9 décembre 2012 12:59:36 UTC+1, Nicolas Morel a écrit :
>
> 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 solution than copy AbstractCellTableBuilder to 
> add a new method renderChildCell. 
>
> Le mercredi 5 décembre 2012 23:27:52 UTC+1, Michael Vogt a écrit :
>>
>> Hello.
>>
>> I have EditTextCells in sub rows of a DataGrid, basically created like in 
>> the sample 
>> DataGrid<http://gwt.google.com/samples/Showcase/Showcase.html#!CwCustomDataGrid>.
>>  
>> I just replace the TextCells in the sub rows with EditTextCells.
>>
>> There are two problems:
>> - When entering edit mode in a sub row cell, the text that is shown is 
>> taken from the root row cell
>> - When the value ist stored, it is also stored in the root row cell
>>
>> Am I doing something wrong, or is this not possible?
>>
>> You can see the effect here <http://freelancemedia.de/datagrid/>:
>>
>>
>> Any help welcome,
>> Michael
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/h2kZoiC9i6wJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to