How to add record from one datagrid to another datagrid RRS feed

  • Question

  • Hi All.

    I'm using EF in the project . The UI layer has WPF Form1 with GataGrid1 of employees that populated by selected ComboBox department value. Now I would like to call From2 from Form1 with DataGrid2 list of all other employees except employees that not displayed in Form1. The list of DataGrid2 will use to add employee or employees to DataGrid1 of Form1. The DataGrid2 should has ability to select multiple rows. How to create LINQ or lambda query to solve that task?  I will appreciate for detail explanation and sample.


    Sunday, August 30, 2020 7:14 PM

All replies

  • Hi zleug,
    Based on your description, it is mostly related to WPF. So it is recommended to ask the questions in Microsoft Q&A forum and you can get more professional answer.
    About LINQ or lambda query in EF, here are somes documents you can refer to.
    [Queries in LINQ to Entities]
    [LINQ to Entities]
    Thank you for your understanding.
    Best Regards,
    Daniel Zhang

    "Windows Forms General" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Windows Forms General" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    Monday, August 31, 2020 7:06 AM
  • Hi Daniel_Zhang-MSFT. Thanks for reply.

    Ok. I will ask by other way. How to SELECT WHERE NOT EXIST using LINQ?


    • Edited by zleug Tuesday, September 1, 2020 2:16 PM
    Monday, August 31, 2020 12:43 PM