locked
Dynamic Data Filtering RRS feed

  • Question

  • User323304077 posted

    So far, Dynamic Data has been amazing and the filters have been pretty useful.  I have a requirement to filter the parent data of a child record.  For example, my main grid is a list of cars and the details grid is a list of owners.  My users would like to filter the list of cars by entering an owner.  Anyone know how to do this?

    Friday, November 21, 2008 2:12 PM

All replies

  • User-330204900 posted

    What is the relationship i.e.:

    Cars->Owners ?

    And what are you using Linq to SQL or Entity Framework?

     

    Friday, November 21, 2008 2:44 PM
  • User323304077 posted

    Using Linq to SQL and in this example, our owner holds the foreign key to the car table.

    Friday, November 21, 2008 2:54 PM
  • User-330204900 posted

    Unless I'm missing something this should happen out of the box e-mail me a screen shot of this part of your model and details of the relationship and I'll ahve a look [:D]

    Friday, November 21, 2008 3:02 PM
  • User-330204900 posted

    So far, Dynamic Data has been amazing and the filters have been pretty useful.  I have a requirement to filter the parent data of a child record.  For example, my main grid is a list of cars and the details grid is a list of owners.  My users would like to filter the list of cars by entering an owner.  Anyone know how to do this?

    I don't thinl there is a way out of the box to do this, but thinking a little out of the box may do it.

    What I was thinking was a custom filter that works on MetaChildren columns, look at this t-sql:

    SELECT o.CustomerID, o.OrderID ,od.Quantity
    FROM [Orders] o
    JOIN [Order Details] od ON
    	od.OrderID = o.OrderID
    WHERE od.Quantity > 10
    GO
    This returns all the Orders where the Order_Detail has a quantity > 10 is this the sort of thing you mean but instead of Quantity it would be Owner?
    Sunday, November 23, 2008 2:28 PM
  • User1000179309 posted

     Where i should put this T-Sql ?. I have some problem using Dynamic Data Filtering, if i have two roles :

    1. Roles is Administration i filter the List using OrganizationId

    2. Roles is User i filter the list using UserId

    Should i created two custom pages  ? Or i can use one page but with dynamic filtering ?

     

    Thanks in Advanc

     

    Nanda

    Tuesday, December 16, 2008 7:18 AM
  • User-330204900 posted

     

    If the question is regarding dynamic Filtering from Codeplex then you should post your question there, if it is regarding normal Dynamic Data Filtering out of the box the maybe I can help. [:D]
    Tuesday, December 16, 2008 7:38 AM
  • User1000179309 posted

    Thanks for quick reply

    Now i'm still using normal Dynamic Data filtering which add Parameter to WhereParameters in the datasource [:D], but actually i don't want to hard code my filter in List.aspx. Do you have any suggestion ?. Thanks for helping

     

    Regards

     

    Nanda

    Tuesday, December 16, 2008 7:55 AM
  • User-330204900 posted

    I would have a look at these articles here on filtering I did regarding adding the advanced filtering in Dynamic Daya Futures:

    1. Part 1 - Getting Dynamic Data Futures filters working in a File Based Website.
    2. Part 2 - Create the AnyColumn filter from the Dynamic Data Futures Integer filter.
    3. Part 3 – Creating the AnyColumnAutocomplete filter.

    Although you requirment may need Josh's Dynamic Data Filtering from codeplex. I'd recommend doenloading the source code as it has a sample website but requires SQL Server 2008 Express.

    Hope this helps [:D]

    Tuesday, December 16, 2008 8:09 AM
  • User1000179309 posted

     Thanks for the reply, sorry if i asking too much.

     I've tried Josh's Dynamic Data Filtering but it's only filter for column that exist in specific table (using lambda expression). And your article i think, only filter specified column. What i need is a filter for several table to show items based on the filter. in my case is If i have 5 table (A,B,C,D,E) i just want to filter only table A,B,C based on column OrganizationId. Any suggestion [:D] ?

     

    Thanks in advance

     

    Nanda

     

     

    Tuesday, December 16, 2008 9:24 AM