|
|
Re: Dynamic Column in Nattable [message #1072663 is a reply to message #1070677] |
Tue, 23 July 2013 08:22 |
dhruba kumar Messages: 51 Registered: September 2012 |
Member |
|
|
Hi Dirk,
Thanks for your reply.
DynamicColumn is working .
Now I have the following queries:
1. In "DynamicColumnExample" sample , when I click on newly added column for sorting,the widget hangs.
2. For adding EDIT rule for cell I ve added the following code:
ColumnOverrideLabelAccumulator labelAccumulator = new ColumnOverrideLabelAccumulator(bodyDataLayer);
bodyDataLayer.setConfigLabelAccumulator(labelAccumulator);
registerColumnLabels(labelAccumulator);
natTable.addConfiguration(new EditorConfiguration(columns)); //For EDIT Rule
public class EditorConfiguration extends AbstractRegistryConfiguration {
private ArrayList<String> columnLabel;
public EditorConfiguration(ArrayList<String> columnLabel)
{
this.columnLabel=columnLabel;
}
@Override
public void configureRegistry(IConfigRegistry configRegistry) {
for(int k=0;k<columnLabel.size();k++)
{
configRegistry.registerConfigAttribute(
EditConfigAttributes.CELL_EDITABLE_RULE,
IEditableRule.ALWAYS_EDITABLE,DisplayMode.EDIT,columnLabel.get(k));
registerSingleLineEditors(configRegistry,columnLabel.get(k));
}
}
But the Editor does not work . All the cell are disabled for Editing.
3. For Filter Row I ve added the following code:
private EventList values = GlazedLists.eventList(new ArrayList());
values.add(createValueRow("Homer"));
values.add(createValueRow("Marge"));
values.add(createValueRow("Bart"));
values.add(createValueRow("Lisa"));
values.add(createValueRow("Maggie"));
SortedList sortedRows = new SortedList(values, null);
filterList = new FilterList(sortedRows);
MyColumnPropertyAccessor columnPropertyAccessor=new MyColumnPropertyAccessor();
SimpleColumnHeaderDataProvider columnHeaderDataProvider =new SimpleColumnHeaderDataProvider();
final GlazedListsGridLayer glazedListsGridLayer = new GlazedListsGridLayer(
filterList,
columnPropertyAccessor,
columnHeaderDataProvider ,
configRegistry,
true);
....
glazedListsGridLayer.setColumnHeaderLayer(filterRowHeaderLayer);
But the Filter is not showing properly in Table
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03895 seconds