Set it via listGrid.dataProperties so it applies to the ResultSet which is automatically created by calling listGrid.fetchData().
Announcement
Collapse
No announcement yet.
X
-
I tried to preserve it this way - is it the right approach?
Code:isc.ListGrid.create({ ID: "countryList", width:500, height:300, alternateRecordStyles:true, dataSource: worldDS, fields:[ {name:"countryCode", title:"Code", width:50}, {name:"countryName", title:"Country"}, {name:"capital", title:"Capital"}, {name:"continent", title:"Continent"} ], autoFetchData: true, showFilterEditor: true }) isc.Button.create({ title:"Fetch",top:400, click: function(){ if(countryList.getFilterEditorCriteria()!=null){ countryList.filterData(countryList.getFilterEditorCriteria()); }else{ countryList.fetchData(); } } })
Comment
-
Ok. I don't think this is the same issue that I asked about earlier but regardless, I'm stuck and not sure what I am missing now. Since I've moved the dynamic value map request to optionDs, the filter editor have become messed up. I'm trying to get to the original code that was working but I can't seem to find the different now. Please take a look at the sample below. You'll notice that the valueMap being used for the filter editors is the result of the listgrid. What am I missing? Been looking at the same code for hours. I could use a fresh set of eyes to look into this hopefully as soon as possible.
Code:<HTML><HEAD><TITLE>Filter editor Issue</TITLE> </HEAD> <body class="pageBackground" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" scroll="no" style="overflow:hidden"> <SCRIPT>var isomorphicDir = "isomorphic/"</SCRIPT> <SCRIPT>var isomorphicDir = "isomorphic/"</SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT> <SCRIPT SRC=isomorphic/skins/Enterprise/load_skin.js></SCRIPT> <SCRIPT> var countryData = [ { cwPK__:"414504073", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504074", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504075", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504076", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504077", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504078", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504079", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504080", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504081", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504082", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504083", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504084", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504085", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504086", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504087", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504088", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504089", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504090", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504091", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504092", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504093", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504094", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504095", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504096", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value1", str_SF$DF:"Value1" } ] isc.DataSource.create({ID:"Table$ds", fields: [{name:"cwPK__",primaryKey:true}, {name:"int_RBH"}, {name:"str_SF"}], showPrompt:false, criteriaPolicy:"dropOnChange", clientOnly: true, testData: countryData}) isc.ListGrid.create({ $cwShowDetailColumn:false, width: 500, height:500, fastCellUpdates:false, cwFirstFocusableFilterField:"int_RBH", groupStartOpen:"first", dataSource:Table$ds, validateOnChange:true, dataProperties:{neverDropUpdatedRows:true}, ID:"Table", cwID:"FinderNS$fnd_doc_editintable$ResultEx$Table", hoverStyle:"CwHoverStyle",recordBaseStyleProperty:"velocityRowStyle", showFilterEditor:true,neverValidate:true,modalEditing:true, canSelectText:true,selectOnEdit:true,willHandleErrors:true, autoFetchData:true, fields: [{title:"<nobr>Integer - Radio Button - Horizontal <\/nobr>", valueMap:{"44":"44","55":"55","99":"99"}, editorType:"SelectItem", editorProperties:{ID:"int_RBH",allowEmptyValue:true}, name:"int_RBH", displayField:"int_RBH$DF", align:"left", validateOnChange:true, width:"100" }, {title:"<nobr>String - Select Field <\/nobr>", valueMap:{"Value1":"Value1","Value2":"Value2","Value3":"Value3"}, editorType:"SelectItem", editorProperties:{ID:"str_SF",allowEmptyValue:true}, name:"str_SF", displayField:"str_SF$DF", align:"left", validateOnChange:true, width:"100" } ] }); </script> </BODY> </html>
Comment
-
Ok I tried to get this to work with the displayField but I cannot. Please help. The first column has a displayField associated with it and the filter editor value map is broken whereas the second column does not have a displayField but it takes the valueMap from the listgrid's result list.
Code:<HTML><HEAD><TITLE>Filter editor Issue</TITLE> </HEAD> <body class="pageBackground" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" scroll="no" style="overflow:hidden"> <SCRIPT>var isomorphicDir = "isomorphic/"</SCRIPT> <SCRIPT>var isomorphicDir = "isomorphic/"</SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT> <SCRIPT SRC=isomorphic/skins/Enterprise/load_skin.js></SCRIPT> <SCRIPT> var countryData = [ { cwPK__:"414504073", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504074", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504075", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504076", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504077", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504078", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504079", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504080", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504081", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504082", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504083", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504084", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504085", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504086", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504087", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504088", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504089", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504090", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504091", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504092", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504093", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504094", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504095", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504096", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value1", str_SF$DF:"Value1" } ] isc.DataSource.create({ID:"Table$ds", fields: [{name:"cwPK__",primaryKey:true}, {name:"int_RBH"}, {name:"str_SF"}], showPrompt:false, criteriaPolicy:"dropOnChange", clientOnly: true, testData: countryData}) isc.ListGrid.create({ $cwShowDetailColumn:false, width: 500, height:500, fastCellUpdates:false, cwFirstFocusableFilterField:"int_RBH", groupStartOpen:"first", dataSource:Table$ds, validateOnChange:true, dataProperties:{neverDropUpdatedRows:true}, ID:"Table", cwID:"FinderNS$fnd_doc_editintable$ResultEx$Table", hoverStyle:"CwHoverStyle",recordBaseStyleProperty:"velocityRowStyle", showFilterEditor:true,neverValidate:true,modalEditing:true, canSelectText:true,selectOnEdit:true,willHandleErrors:true, autoFetchData:true, fields: [{title:"<nobr>Integer - Radio Button - Horizontal <\/nobr>", editorType:"SelectItem", name:"int_RBH", align:"left", validateOnChange:true, width:"100",valueMap:{"44":"44","55":"55","99":"99"}, filterEditorProperties:{name:"int_RBH",align:"left",validateOnChange:true,width:"100"}, displayField:"int_RBH$DF" }, {title:"<nobr>String - Select Field <\/nobr>", valueMap:{"Value1":"Value1","Value2":"Value2","Value3":"Value3"}, editorType:"SelectItem", name:"str_SF", align:"left", validateOnChange:true, width:"100", filterEditorProperties:{name:"str_SF",align:"left",validateOnChange:true,width:"100"} } ] }); </script> </BODY> </html>
Comment
-
I even tried setting filterEditorValueMap and the filter editor still does not pick up the valueMap I specified:
Code:<HTML><HEAD><TITLE>Filter editor Issue</TITLE> </HEAD> <body class="pageBackground" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0" scroll="no" style="overflow:hidden"> <SCRIPT>var isomorphicDir = "isomorphic/"</SCRIPT> <SCRIPT>var isomorphicDir = "isomorphic/"</SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT> <SCRIPT SRC=isomorphic/skins/Enterprise/load_skin.js></SCRIPT> <SCRIPT> var countryData = [ { cwPK__:"414504073", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504074", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504075", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504076", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504077", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504078", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504079", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504080", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value1", str_SF$DF:"Value1" }, { cwPK__:"414504081", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504082", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504083", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504084", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504085", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:null, str_SF$DF:"" }, { cwPK__:"414504086", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504087", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504088", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504089", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504090", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:"Value3", str_SF$DF:"Value3" }, { cwPK__:"414504091", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504092", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504093", $isCwSelected:false, int_RBH:55, int_RBH$DF:"55", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504094", $isCwSelected:false, int_RBH:null, int_RBH$DF:"", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504095", $isCwSelected:false, int_RBH:44, int_RBH$DF:"44", str_SF:"Value2", str_SF$DF:"Value2" }, { cwPK__:"414504096", $isCwSelected:false, int_RBH:99, int_RBH$DF:"99", str_SF:"Value1", str_SF$DF:"Value1" } ] isc.DataSource.create({ID:"Table$ds", fields: [{name:"cwPK__",primaryKey:true}, {name:"int_RBH"}, {name:"str_SF"}], showPrompt:false, criteriaPolicy:"dropOnChange", clientOnly: true, testData: countryData}) isc.ListGrid.create({ width: 500, height:500, ID:"Table", dataSource: Table$ds, showFilterEditor:true, autoFetchData:true, fields: [{title:"<nobr>Integer - Radio Button - Horizontal <\/nobr>", valueMap:{"44":"44","55":"55","99":"99"}, editorType:"SelectItem", editorProperties:{ID:"int_RBH",allowEmptyValue:true}, filterEditorValueMap:{"44":"44","55":"55","99":"99"}, filterEditorProperties:{name:"int_RBH"}, name:"int_RBH",displayField:"int_RBH$DF", align:"left",width:"100"}]}); </script> </BODY> </html>
Comment
Comment