SelectItem.setOptionDataSource in ListGrid

Does the ListGrid class support the equivalent of setOptionDataSource(), which is supported for the form controls SelectItem and ComboBoxItem? I would like to include a drop-down field in a grid which binds to a data source. In addition, I’d like the text in the drop-down to show a description, and not the ID of the records in the other data source (the ID is the primary key, but is not meaningful to a user).

Failing the ability to reference another data source, can I use a Map<Integer, String> as the parameter to the DataSourceField.setValueMap() method, such that the displayed values are the values from the map, and the returned values are the keys from the map?

I was looking for this same feature. In order to be able to get this working I would expect something like a DataSourceSelectField? And on such a datasourcefield you need to set the foreignkey, optiondatasource, optionvaluefield, optiondescription field? Is something like this aivailable in the JS smartclient lib?

It’s there - listGridField.setOptionDataSource() for loading the complete options up from or SelectItem/ComboBoxItem.optionDataSource for data paging.

Note the doc refers to using setEditorProperties() which is not there yet in SmartGWT, but you can get the same effect with a trivial subclass of eg SelectItem that sets optionDataSource on construction, combined with listGridField.setEditorType.

Thank you for your answer … it is just what I was looking for (and I don’t know why I missed it when I first looked at the ListGridField!).

Andy