I would like to suppress filtering on every key press in an editable ListGrid field defined as follows:
My intention is to force a database fetch on the ClinicalTrial table whenever the user edits the 'trial' field, since the ClinicalTrial table is constantly being updated through various users.
Since the names of clinical trials all start with 'NCT' I also want to prevent filtering on the 'trial' field until the entire NCTID number has been entered by the user. This type of behavior seems to work fine in the filterEditor but not when editing a field in the ListGrid.
I am having two issues;
1) The ClinicalTrialDS optionDataSource seems to be maintaining its cache even though I use cachePickListResults: false
2) The dataset is being fetched (in the editor) on every keystroke. I know that filterOnKeypress typically applies to filtering in the filterEditor, but I am filtering in an editable field in the ListGrid.
Any help would be appreciated.
Thanks
pf
Code:
var myGrid = isc.ListGrid.create({ dataSource: "DiseaseMarkerTrialDS", width: 200, height: 100, showFilterEditor: false, fields: [{name: "trial", width: "*", filterOnKeypress: false, editorProperties: { cachePickListResults: false, optionDataSource: "ClinicalTrialDS", optionFilterContext: {sortBy: "name", textMatchStyle: "startsWith"}, valueField: "id", displayField: "name" } } ] ...
Since the names of clinical trials all start with 'NCT' I also want to prevent filtering on the 'trial' field until the entire NCTID number has been entered by the user. This type of behavior seems to work fine in the filterEditor but not when editing a field in the ListGrid.
I am having two issues;
1) The ClinicalTrialDS optionDataSource seems to be maintaining its cache even though I use cachePickListResults: false
2) The dataset is being fetched (in the editor) on every keystroke. I know that filterOnKeypress typically applies to filtering in the filterEditor, but I am filtering in an editable field in the ListGrid.
Any help would be appreciated.
Thanks
pf
Comment