Hi
We have a Silverlight 4 application and use it in combination with RIA services. All the filterning/sorting/grouping/paging is therefore done serverside. We have now encountered a problem:
In order for a column to be filterable (sortable etc), there has to be a corresponding field in the database. For this reason, we have some calculated fields that show the number of linked entities (integer field that returns the count()). What causing us trouble is the following:
in a use case, we can assign entities but the user does not yet save the items to the database. The "Count" field in the grid has to reflect the temporary changes. However, when we update the count of the calculated field (generated by the ria services, it has a setter!!) the tracked entity is marked as modified which prevents the user from furhter filtering, paging in the concerned grid (i believe it is because the domain datasource.HasChanges is true).
To solve the issue, i have set the GridViewBoundColumnBase.SortMemberPath and the GridViewBoundColumnBase.GroupMemberPath to the acutal field in the database and the GridViewBoundColumnBase.DataMemberPath to the temporary field. This works well, except for the filtering. Filtering does not work because, the column the application tries to filter on, does not exist in the database!
In short: what I need is the following:
Analogous to SortMemberPath or GroupMemberPath in the GridViewBoundColumnBase I would need a FilterMemberPath property (or alternativly a DisplayMemberPath!
As this does not exist, is there a workaround?
Greetings and thanks in advance..
We have a Silverlight 4 application and use it in combination with RIA services. All the filterning/sorting/grouping/paging is therefore done serverside. We have now encountered a problem:
In order for a column to be filterable (sortable etc), there has to be a corresponding field in the database. For this reason, we have some calculated fields that show the number of linked entities (integer field that returns the count()). What causing us trouble is the following:
in a use case, we can assign entities but the user does not yet save the items to the database. The "Count" field in the grid has to reflect the temporary changes. However, when we update the count of the calculated field (generated by the ria services, it has a setter!!) the tracked entity is marked as modified which prevents the user from furhter filtering, paging in the concerned grid (i believe it is because the domain datasource.HasChanges is true).
To solve the issue, i have set the GridViewBoundColumnBase.SortMemberPath and the GridViewBoundColumnBase.GroupMemberPath to the acutal field in the database and the GridViewBoundColumnBase.DataMemberPath to the temporary field. This works well, except for the filtering. Filtering does not work because, the column the application tries to filter on, does not exist in the database!
In short: what I need is the following:
Analogous to SortMemberPath or GroupMemberPath in the GridViewBoundColumnBase I would need a FilterMemberPath property (or alternativly a DisplayMemberPath!
As this does not exist, is there a workaround?
Greetings and thanks in advance..