I have a ListGrid with using a dataSource called "InterventionDS":
The drug field points to a drug table that has many records so I use the technique of creating a second field "drugName" as the displayField for "drug".
When the gird is populated the names appear correctly. When I am editing the grid they do not. The valueField displays instead of the displayField. This is true for both creating a new record in the grid and for updating an existing record. Any record that is edited loses it's displayField mapping.
When a new record is created and or updated on the server, the full record is always returned including the drugName.
Do I have this set up properly? Also, what is the interaction between the ListGrid.displayField (drugName) and PickList.displayField (name)?
Finally, is there a way using the ComboBox to do successive name completion so that every character typed further reduces the picklist?
Thanks,
pf
Code:
<DataSource ID="InterventionDS" serverType="generic" > <fields> <field name="drug" title="drug" type="text" required="true" /> <field name="drugName" title="drug name" type="text" hidden="true" /> ...
Code:
var grid = isc.ListGrid.create({ dataSource: "InterventionDS", autoFetchDisplayMap: false, fields: [{name: "drug", width: 125, displayField: "drugName", editorType: "ComboBox", editorProperties: { showPickListOnKeypress: false, pickListCriteria: {metatype: "Drug"}, getPickListFilterCriteria: function() { return {metatype: "Drug", name: this.getValue()}; }, optionDataSource: "genericNameSearch", valueField: "id", displayField: "name"} }, ...], ...
When a new record is created and or updated on the server, the full record is always returned including the drugName.
Do I have this set up properly? Also, what is the interaction between the ListGrid.displayField (drugName) and PickList.displayField (name)?
Finally, is there a way using the ComboBox to do successive name completion so that every character typed further reduces the picklist?
Thanks,
pf
Comment