Hi,
How can I create a ListGrid to use a custom DataSourceField?
What I did was:
1) Created a custom Widget
2) Created a custom DataSourceField (CustomDataSourceField that extends DataSourceField and set some custom atributes)
3) Created a DataSource with one of the fields as a instance of this CustomDataSourceField
4) Created a ListGrid setting the datasource to the DataSource create on step 3.
Now what I want to do:
When editing a cell that is bounded to a customdatasourcefield, it shall automatically use the custom widget for editing.
I don't want to set manually the ListGridFIelds, and then calling the setEditorType() method of the ListGridField when building the Grid, because I want only to create the DataSource (because latter I will reuse the same datasource also in a DynamicForm)
To accomplish that, I'm trying to extend the ListGrid to a CustomListGrid that supports the CustomDataSourceField, but I don't know when to "intercept" the ListGrid so I can force the use of my CustomWidget for editing.
Thanks,
Cerávolo
How can I create a ListGrid to use a custom DataSourceField?
What I did was:
1) Created a custom Widget
2) Created a custom DataSourceField (CustomDataSourceField that extends DataSourceField and set some custom atributes)
3) Created a DataSource with one of the fields as a instance of this CustomDataSourceField
4) Created a ListGrid setting the datasource to the DataSource create on step 3.
Now what I want to do:
When editing a cell that is bounded to a customdatasourcefield, it shall automatically use the custom widget for editing.
I don't want to set manually the ListGridFIelds, and then calling the setEditorType() method of the ListGridField when building the Grid, because I want only to create the DataSource (because latter I will reuse the same datasource also in a DynamicForm)
To accomplish that, I'm trying to extend the ListGrid to a CustomListGrid that supports the CustomDataSourceField, but I don't know when to "intercept" the ListGrid so I can force the use of my CustomWidget for editing.
Thanks,
Cerávolo
Comment