Hi,
I have a column with dataPath="kobi/test", and I'm trying to filter by it - with no success.
I tested this issue with your `Local DataSource` example
https://www.smartclient.com/smartcli...ocalDataSource
and changed these files as follows:
CountryDS
*********
isc.DataSource.create({
ID: "countryDS",
fields:[
{name:"kobi", title:"Kobi"},
{name:"countryCode", title:"Code"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"}
],
clientOnly: true,
testData: countryData
})
CountryData
**********
countryData = [
{
kobi: {
test: 4
}
},
{
continent:"North America",
countryName:"United States",
countryCode:"US",
area:9631420,
population:298444215,
gdp:12360.0,
independence:new Date(1776,6,4),
government:"federal republic",
government_desc:2,
capital:"Washington, DC",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_states"
},
]
dataBound.js
***********
isc.ListGrid.create({
ID: "countryList",
width:500, height:224, alternateRecordStyles:true, showAllRecords:true,
dataSource: countryDS,
autoFetchData: true,
showFilterEditor: true,
useAdvancedCriteria:true,
fields:[
{name:"test", title:"Test", dataPath: "kobi/test"},
{name:"countryCode", title:"Code"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"}
],
})
***************
I can't filter by this "test" column.
When I try to filter by this column, and I run this command:
countryList.filterEditor.getValues(),
I get this object:
{ operator: "and",
_constructor: "AdvancedCriteria",
criteria: [{fieldName: "kobi/test", operator: "iContains", value: "4"}]
}
and the filter doesn't work.
Can you please help?
I have a column with dataPath="kobi/test", and I'm trying to filter by it - with no success.
I tested this issue with your `Local DataSource` example
https://www.smartclient.com/smartcli...ocalDataSource
and changed these files as follows:
CountryDS
*********
isc.DataSource.create({
ID: "countryDS",
fields:[
{name:"kobi", title:"Kobi"},
{name:"countryCode", title:"Code"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"}
],
clientOnly: true,
testData: countryData
})
CountryData
**********
countryData = [
{
kobi: {
test: 4
}
},
{
continent:"North America",
countryName:"United States",
countryCode:"US",
area:9631420,
population:298444215,
gdp:12360.0,
independence:new Date(1776,6,4),
government:"federal republic",
government_desc:2,
capital:"Washington, DC",
member_g8:true,
article:"http://en.wikipedia.org/wiki/United_states"
},
]
dataBound.js
***********
isc.ListGrid.create({
ID: "countryList",
width:500, height:224, alternateRecordStyles:true, showAllRecords:true,
dataSource: countryDS,
autoFetchData: true,
showFilterEditor: true,
useAdvancedCriteria:true,
fields:[
{name:"test", title:"Test", dataPath: "kobi/test"},
{name:"countryCode", title:"Code"},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"}
],
})
***************
I can't filter by this "test" column.
When I try to filter by this column, and I run this command:
countryList.filterEditor.getValues(),
I get this object:
{ operator: "and",
_constructor: "AdvancedCriteria",
criteria: [{fieldName: "kobi/test", operator: "iContains", value: "4"}]
}
and the filter doesn't work.
Can you please help?
Comment