We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

MULTIPLE DATASOURCE

Thread ID:

Created:

Updated:

Platform:

Replies:

116985 Jul 15,2014 12:50 PM Jul 21,2014 08:40 AM WPF 1
loading
Tags: SfDataGrid
Daniele Alessandro
Asked On July 15, 2014 12:50 PM

Hi, 
I need to bind multiple tables of a database to a Sfdatagrid using dataclasses
I write code to execute a Linq join query but I can not view the result in the SfDatagrid
How can I do?

Farjana Parveen Ayubb [Syncfusion]
Replied On July 21, 2014 08:40 AM

Hi Daniele,

 

Thank you for contacting Syncfusion support.

 

We analyzed your query. You can achieve your requirement by using below code snippet

 

Please refer the following code snippet and sample in the following location:

 

Code Snippet:

DataTable dataTableSqlJoined = new DataTable();

           var result=from datarow1 in dataTable.AsEnumerable()

                     join

                     datarow2 in dataTable1.AsEnumerable()

                     on

                     datarow1.Field<int>("ID") equals datarow2.Field<int>("ID")

                     select

                     datarow1;

          DataTable dataTableLinqJoined = result.CopyToDataTable();

          DataSource = dataTableLinqJoined.DefaultView;

 

 

Regards,

Farjana Parveen A


Attachment: DataTable_Linq_Query_7caf265c.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;