I would like to use the same DMI DataSource to fetch data for different ListGrid controls. The default filter criteria for each of these lists is very complex and must be added to the criteria provided by the user through the filterEditor.
Is there a way the fetch can determine which list originated the request?
I would like to add a requestType to the criteria that I would set on a per GridList basis:
{
requestType: "reqTypeA"
}
The problem I have now is that I can’t add this field to the filterEditor criteria.
Use ListGrid.fetchOperation, which populates dsRequest.operationId
A record added to either of a GridList that share the same DataSource is also added to all other lists.
Is there a way to create a separate DataSource for each GridList?
I tried something like this and I got strange results:
// in the GridList
//
dataSource: this.createDataSource(),
...
createDataSource: function() {
var ds = isc.DataSource.create({
ID: "testDMI",
addGlobalId: false,
fields:[
{name:"id", title:"Id"},
{name:"parentId", title:"Parent Id"},
{name:"name", title:"Name"}
]
});
return ds;
}
You could do it that way if the DataSources had unique IDs. However a better option is to set ResultSet.disableCacheSync via ListGrid.dataProperties.