url: window.stpURL +
In the above data source the data.id item passed to the read.url is dynamic, that is fantastic.
My situation is this:
The schema.model.fields property is also dynamic and can change based on the data.id.
My understanding from the documentation is that the fields property can't be a function.
So before I do a ds.read I can query another url to get the fields that will be returned for an id. Call this 'fieldsOfId'
If they are different than the current schema.model.fields I should do ... what?
1. Create a new datasource using the fieldsOfId value.
2. Change the value of schema.model.fields of that of fieldsOfId and mark the schema/datasource as 'dirty'
Regardless of how the data source is managed, the Grid that it is attached to will also need to have its columns property adjusted to match the fields of the datasource.