Hi everyone,
I really hope someone can help with this issue I am having. It seems to me that the objectdatasource is very limited.
I am trying what I think to be very simple, I have a customer details page, in the page is a datagrid of related contacts Customer.Customers_Contacts and I wanted to use the objectdatasource to view only the 'active' contacts for that customer.
Firstly I cannot assign my own query that is independant of the entitymanager ie Customer_Contacts.where(x => x.Inactive = false && x.CustomerID = customerid) I wanted to extend the customer entity and add a "FilteredContacts" query and bind this to the query parameter
Secondly failing step one I decided to try and use filterdescriptors on the objectdatasource to specify;
ib:FilterDescriptor PropertyPath="CustomerID" Operator="IsEqualTo" Value="{Binding CustomerID}" >
This would then substitute my current customers id into the filter (CANNOT HAVE A BINDING FOR VALUE)
Thirdly it seems that you cannot filter on a non-string property, (forgetting customerid) every time I try to filter on InActive (bool);
ib:FilterDescriptor PropertyPath="InActive" Operator="IsEqualTo" Value="false" >
The resultant query to the entity manager has disregarded by filter and simply queries all contacts???I really hope there is a solution to this, can anyone shed some light before I pull out all of my hair :)ThanksMark
Edited by markfinch - 13-May-2012 at 9:24am