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

Convert DataSourceRequest to SQL text

1 Answer 378 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 18 Aug 2012, 10:54 PM
I am using an AJAX driven grid that is pulling it's data from SQL Azure.  I would like to use the paging feature, as we can have > 100,000 rows.

I see in the examples there are extensions to help take the DataSourceRequest and apply it to the data to enable to paging.  I'm assuming when this is applied to an IQueryable<> with Entity Framework (or similar) that it will apply the sorting, grouping and paging automatically to the query on the database.

However, our data access layer does not use EF or IQueryable<>, we are using straight SqlClient to access the database.  

With this said, we need to take the DataSourceRequest and apply that to a standard text sql query.  We can write this code ourselves, but wondering if this is a utility that already exists in the kendo framework?  Or is there an example to get us started?

Thanks for the help in advance

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 20 Aug 2012, 07:58 AM
Hi Kevin, 

You should generate the SQL by yourself as Kendo UI does not provide any SQL generation code. It can only generate expression trees which are translated to SQL by the underlying LINQ provider e.g. Entity Framework.

All the best,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Kevin
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or