none
Binding query results to detail-master data grid views RRS feed

  • Question

  • Hi

    When retrieving an entity/related entity combination via below query;

    Dim Query = From a In Context.MyEntity.Include(“MyRelatedEntity”) Select a

    How can the results be bound to two data grid views, one each for MyEntity and MyRelatedEntity?

    Thanks

    Regards






    Saturday, July 23, 2011 1:28 AM

Answers

  • Hi,

    You don't specify what type of datagrid you are binding against. Is it WinForms/WPF/ASP.NET or other variants?

    But generally, you need to have two grids, where the first one binds to the query result. The second grid should binds it datasource to the currently selected entity in the main grid entity -> MyRelatedEntity whenever the first grid changes it's selected entity.


    --Rune
    Sunday, July 24, 2011 11:44 AM

All replies

  • Hi,

    You don't specify what type of datagrid you are binding against. Is it WinForms/WPF/ASP.NET or other variants?

    But generally, you need to have two grids, where the first one binds to the query result. The second grid should binds it datasource to the currently selected entity in the main grid entity -> MyRelatedEntity whenever the first grid changes it's selected entity.


    --Rune
    Sunday, July 24, 2011 11:44 AM
  • Hi,

    I am writing to check the status of the issue on your side.  Would you mind letting us know the result of the suggestions?

    If you need further assistance, please feel free to let me know.   I will be more than happy to be of assistance.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, August 2, 2011 3:56 PM
    Moderator