SmartClient Version: v12.1p_2021-10-22/PowerEdition Deployment (built 2021-10-22)
I have a SelectItem, and like in your example: https://www.smartclient.com/smartgwt...#selectlist_ms I want the select list to be more than a single field value. The user wants to see several fields in order to pick the correct single choice.
I don't want to automatically fetch the data from a DataSource (Run_Names), but I do want to set the fields of the SelectItem to display the "Name" and "PredictedResults" fields.
I have the data I want to put in the selector already, as a RecordList.
The difficulty is that I only see a refRunSelector.setValues ( Map ) call, and I really want to do a
refRunSelector.setData( Record[] foo) ;
call, or one of the forms of a ListGrid.setData().
What is the appropriate way to do this, or am I on completely the wrong track?
I have a SelectItem, and like in your example: https://www.smartclient.com/smartgwt...#selectlist_ms I want the select list to be more than a single field value. The user wants to see several fields in order to pick the correct single choice.
Code:
refRunSelector = new SelectItem(); // refRunSelector.setOptionDataSource("Run_Names"); ??? ListGridField nameField = new ListGridField("Name","Run Name"); nameField.setType( ListGridFieldType.TEXT ); ListGridField predictedField = new ListGridField("PredictedResults", "Predicted Result"); predictedField.setType( ListGridFieldType.TEXT ); refRunSelector.setPickListFields(nameField, predictedField); refRunSelector.setDisplayField("Name"); refRunSelector.setValueField("PK_Run_Name");
I have the data I want to put in the selector already, as a RecordList.
The difficulty is that I only see a refRunSelector.setValues ( Map ) call, and I really want to do a
refRunSelector.setData( Record[] foo) ;
call, or one of the forms of a ListGrid.setData().
What is the appropriate way to do this, or am I on completely the wrong track?
Comment