Dear all,
I try to make an special filter on my ListGrid, where faced the problem, and spend much time without any result:
Description:
I have a simple form with one checkbox and one ListGrid where get records from DataSource, where get data via dataURL (ofcourse Json format)
The ListGrid have selectionAppearance:"checkbox"
we need: when I check the checkbox from DynamicForm, must filter list grid and show only selected field (where is ckecked)
but i dunno how to do it.
One of my vision is to add one more hidden field with type boolean and when record is selecte place in that field the true value, and when i click to DynamicForm checkbox i set the criteria by that hidden field. This solution work only if I use testData with an arrayObjects of countries in DataSource, if i use dataURL then that example not work.
Problem:
1. How to set default value of my hidden field (when i debug i see all value is undefined)
2. how can I set the filter to default generated checkbox, means ( selectionAppearance:"checkbox") without any supplementary hidden fields
isc_version=v11.0p_2016-05-14 and v9.1 also problem
PS. Please help me ;(
I try to make an special filter on my ListGrid, where faced the problem, and spend much time without any result:
Description:
I have a simple form with one checkbox and one ListGrid where get records from DataSource, where get data via dataURL (ofcourse Json format)
The ListGrid have selectionAppearance:"checkbox"
we need: when I check the checkbox from DynamicForm, must filter list grid and show only selected field (where is ckecked)
but i dunno how to do it.
One of my vision is to add one more hidden field with type boolean and when record is selecte place in that field the true value, and when i click to DynamicForm checkbox i set the criteria by that hidden field. This solution work only if I use testData with an arrayObjects of countries in DataSource, if i use dataURL then that example not work.
Problem:
1. How to set default value of my hidden field (when i debug i see all value is undefined)
2. how can I set the filter to default generated checkbox, means ( selectionAppearance:"checkbox") without any supplementary hidden fields
isc_version=v11.0p_2016-05-14 and v9.1 also problem
Code:
isc.DataSource.create({ ID: "countryDS", clientOnly:true, dataURL: "/data/xmlrpc/.....", fields:[ {name:"countryCode", title:"Code", primaryKey:true}, {name:"countryName", title:"Country"}, {name:"filterFlag", title:"hide", type:"boolean"} ], //testData: countryData }); isc.ListGrid.create({ ID: "countryList", width:500, height:224, alternateRecordStyles:true,showRowNumbers:true, autoFetchData:true, selectionAppearance:"checkbox", dataSource: countryDS, selectionChanged: function(item, isChecked) { item.filterFlag = isChecked; }, fields:[ {name:"countryCode", title:"Code"}, {name:"countryName", title:"Country"}, {name:"filterFlag", title:"Filter", type:"boolean", canEdit: true, /*visibility:false, hidden: true, defaultValue:true*/ } ] }); isc.DynamicForm.create({ ID: "form_normal_supplier_test3", left:360, top:220, fields: [ {name:"showSelected", title:"Show selected", showTitle: true, type:"checkbox", width: "*", align:"left", titleAlign :"right", changed: function (form, item, value) { if (value == true){ countryList.setCriteria({"filterFlag": true}); } else { countryList.clearCriteria(); } }}, ] });
Comment