I have a ListGrid with showFilterEditor:true and I wanted to use defaultFilterValue for one or more of the fields on the initial display of the grid. The intention being to allow the user to reduce the search criteria from a default more restrictive set. However, I've found that unless the grid has autoFetchData:false the defaultFilterValue is ignored. I'm not sure if this is intentional or a bug. It would be nice if it were a bug and it could be fixed. There isn't much documentation that I could find on defaultFilterValue, so perhaps its just the documentation that could do with a little revision?
Here is a sample that shows the current behavior (taken from the Disable Filter example):
If you then change the value of autoFetchData to true, the defaultFilterValue on the countryName field is not used.
Here is a sample that shows the current behavior (taken from the Disable Filter example):
Code:
isc.ListGrid.create({ ID: "countryList", width:500, height:300, alternateRecordStyles:true, cellHeight: 30, dataSource: worldDS, fields:[ {name:"countryCode", title:"Flag", width:50, type:"image", imageSize:24, imageURLPrefix:"flags/24/", imageURLSuffix:".png", canFilter:false }, {name:"countryName", title:"Country", defaultFilterValue:'uni'}, {name:"capital", title:"Capital", canFilter:false }, {name:"continent", title:"Continent"} ], autoFetchData: false, showFilterEditor: true })
Comment