This is a migrated thread and some comments may be shown as answers.

Inner join sqldatasource when selecting data

1 Answer 183 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nandkishor
Top achievements
Rank 1
Nandkishor asked on 17 Feb 2012, 12:07 PM
Hello ,

  I am using  telerick Ajax grid.

 I am to select data using in page data source , but i found plan queries in demo code. I want to select data using multiple tables with the help of inner join.

 please suggest.

 Thanks ,
Nandkishor.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Feb 2012, 12:39 PM
Hello,

Here is an example which illustrate the same.
ASPX:
<telerik:RadGrid ID="radGrid1" runat="server"  AllowPaging="true"  DataSourceID="SqlDataSource1" AutoGenerateColumns="true" >
</telerik:RadGrid>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" SelectCommand="SELECT Orders.CustomerID,Orders.OrderDate,Customers.ContactName,Customers.CompanyName FROM [Orders] inner join [Customers] ON Orders.CustomerID=Customers.CustomerID">
</asp:SqlDataSource>

Thanks,
Princy.
Tags
Grid
Asked by
Nandkishor
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or