Using: SmartClient_v110p_2017-05-15_PowerEdition
I'm hoping to create a comboBoxItem where the picklist is filtered based both on the user's input to the comboBox and the selection in anther field. I have a function to override getPickListFilterCriteria that works to filter the pickList based on the selection in the other field, but it currently kills the filtering based on the user input to the comboBox. So I'd like to know how to access the user input from within my getPickListFilterCriteria function so that it can return a criteria that includes both constraints.
Code:
isc.DataSource.get("buildings").fetchData(null,"window.buildings = data");
isc.ListGrid.create({
ID:"spaceAssignGrid",
autoDraw:false,
autoFetchData:true,
dataSource:"roomAssignments",
fields:[
{
name:"roomNumber",
width:70,
editorType:"ComboBoxItem",
editorProperties:{
optionDataSource:"rooms",
getPickListFilterCriteria : function () {
var code_Building = this.grid.getEditedCell(this.rowNum, "buildingNameShort");
code_Building = window.buildings.getValueMap("buildingNameShort","code")[code_Building];
return {code_Buildings:code_Building};
},
displayField:"roomNumber",
valueField:"id",
},
},
{
name:"buildingNameShort",
editorType:"selectItem",
editorProperties : {
optionDataSource:"buildings"
}
},
...etc.
Thanks
Russ Poyner
I'm hoping to create a comboBoxItem where the picklist is filtered based both on the user's input to the comboBox and the selection in anther field. I have a function to override getPickListFilterCriteria that works to filter the pickList based on the selection in the other field, but it currently kills the filtering based on the user input to the comboBox. So I'd like to know how to access the user input from within my getPickListFilterCriteria function so that it can return a criteria that includes both constraints.
Code:
isc.DataSource.get("buildings").fetchData(null,"window.buildings = data");
isc.ListGrid.create({
ID:"spaceAssignGrid",
autoDraw:false,
autoFetchData:true,
dataSource:"roomAssignments",
fields:[
{
name:"roomNumber",
width:70,
editorType:"ComboBoxItem",
editorProperties:{
optionDataSource:"rooms",
getPickListFilterCriteria : function () {
var code_Building = this.grid.getEditedCell(this.rowNum, "buildingNameShort");
code_Building = window.buildings.getValueMap("buildingNameShort","code")[code_Building];
return {code_Buildings:code_Building};
},
displayField:"roomNumber",
valueField:"id",
},
},
{
name:"buildingNameShort",
editorType:"selectItem",
editorProperties : {
optionDataSource:"buildings"
}
},
...etc.
Thanks
Russ Poyner
Comment