SmartGWT version: 3.0.0 nightly from 11/23
I'm wondering what the the corret way to put a custom control in a ListGrid cell? The grid is backed by a data source that is being updated in the background. The cells containing the custom controls need to update when the datasource data backing the cell is updated in the data source.
Following the showcase sample, I tried overriding the createRecordComponent method to place my widget in the cell (calling the base class implementation of createRecordComponent for the other non-custom columns in the grid).
This seems to have some issues that makes me think it is not the correct way to go about this.
First of all, the text data in the data source that is used to back the cell shows as intermixed with my custom control content (I solved this by using a cell formatter to "transform" the content to an empty string). This seems like a hack to me.
More problematic is handling updates to the data source. When fields in the record are updated in the data source, the createRecordComponent method gets called for all of the columns EXCEPT the one where I returned a custom canvas originally for my custom cell. Therefore, the cell does not update when data source value changes.
I'm looking for direction on the correct way to implement a custom control in a grid cell backed by changing data. I'm willing to consider using a different grid control if ListGrid is not the correct choice.
I'm wondering what the the corret way to put a custom control in a ListGrid cell? The grid is backed by a data source that is being updated in the background. The cells containing the custom controls need to update when the datasource data backing the cell is updated in the data source.
Following the showcase sample, I tried overriding the createRecordComponent method to place my widget in the cell (calling the base class implementation of createRecordComponent for the other non-custom columns in the grid).
This seems to have some issues that makes me think it is not the correct way to go about this.
First of all, the text data in the data source that is used to back the cell shows as intermixed with my custom control content (I solved this by using a cell formatter to "transform" the content to an empty string). This seems like a hack to me.
More problematic is handling updates to the data source. When fields in the record are updated in the data source, the createRecordComponent method gets called for all of the columns EXCEPT the one where I returned a custom canvas originally for my custom cell. Therefore, the cell does not update when data source value changes.
I'm looking for direction on the correct way to implement a custom control in a grid cell backed by changing data. I'm willing to consider using a different grid control if ListGrid is not the correct choice.
Comment