Maximum performance using Telerik RadGrid client-side data-binding with LINQ to SQL

Thursday, July 17, 2008 by Vladimir Enchev | Comments 4

As I mentioned in one of my previous posts with RadGrid for ASP.NET AJAX Q2 2008 you can access the grid sort and filter expressions on the client.

While filter expressions toString() method will create SQL syntax representing current grid filtering now you have toDynamicLinq() method which will create LINQ expression that can be used directly with Dynamic LINQ library.

With few lines of code you will get minimum transfer between server and client (pure JSON):

Post request to the server

Response from the server

and on the server side LINQ to SQL will apply all requested operations directly on the data-base server:

SQL Server Profiler

Live Demo | Download

4 Comments

  • Chris 18 Jul 2008
    Good stuff! I'd be interested in each of the products in your newest ajax suite getting big new sections in the help, something like 'Advanced ultra high performance web service techniques'. In these sections you could describe various methods like above to minimize transfer, replacing viewstate and postbacks with web service calls. I've been burned by giant viewstate and postbacks before, and getting ALL the telerik controls to avoid it would be of great interest. These new help sections could describe how to use telerik controls in strictly web service mode, postback-free with minimum transfer.
  • Stefan Dobrev 19 Jul 2008
    Great stuff guys!
  • nickd 30 Jan 2009
    Interesting, but...

    If you look at the traffic in FireBug, you see that applying a filter to one field (company name starts with 'F' in my case) there are three identical GetData requests and three identical GetCount requests. Hardly 'minimum transfer'.
  • nickd 30 Jan 2009
    Hmm. I have to take that back. I don't know why there were mutiple requests before, I'm only getting one of each now.

    Sorry for the hasty remarks.

Add comment

  1. Formatting options
       
     
     
     
     
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)