Screencast: Enable Server Mode using LINQ (ASPxGridView & XtraGrid)

25 March 2008

In a previous post, I showed you how to use the powerful Server mode feature in ASPxGridView and XtraGrid against large datasets. The response to Server mode was so good that we've extended the ways that you can enable it.

You can now use a LINQ provider to work with our .NET grids in Server mode. The latest release, 2008 Volume 1, introduces two new datasources to support LINQ.   LinqServerModeDataSource supports the ASPxGridView and the LinqServerModeSource supports the XtraGrid. To use these datasources against either the ASPxGridView or XtraGrid, try the steps demonstrated in the short screencasts below.

ASPxGridView Screencast

image

XtraGrid Screencast

image[3]

The LINQ support in Server mode is bleeding-edge technology which gives you the performance gains for your projects. Check out this cool feature then let me know how you're using LINQ and how you plan to use these new LINQ datasources.

33 comment(s)
Rinat Abdullin

Mehul,

Sorry for the naive questions, but still:

What is the difference between LinqServerModeDataSource LinqServerModeSource?

Are there any performance gains of using new data sources as opposed to XPServerCollectionSource (esp, in the number of roundtrips)? Are there any performance measurements?

Best regards,

Rinat Abdullin

NB for the Web Admins: You can easily bind the RSS feed directly to devexpress domain (just requires minor DNS tweak). Feedburner supports that.

25 March, 2008
Mehul Harry (DevExpress)

Hello Rinat,

"LinqServerModeDataSource supports the ASPxGridView and the LinqServerModeSource supports the XtraGrid" Smile

As for performance, the server mode is still blazingly fast with the new datasources. I'll see if there are any measurements. Thanks for the tip on the RSS Feed.

25 March, 2008
Ben Hayat

Mehul;

This would be my first to use LinqServerModeDataSource, and here is my question. As you know, ASP.Net provides LinqDatasource that you can use.

a) Is yours a replacement to the stock LinqDataSource?

b) If yes, can you point out what are the differences?

c) Can we use your DataSource with some of the ASP.Net stock (std) controls that come with VS2008 or should we use yours only for DX products?

Thanks!

..Ben

25 March, 2008
Mehul Harry (DevExpress)

Hello Ben,

LinqServerModeDataSource doesn't replace the standard class. It allows you to use an ASPxGridView (or XtraGrid) in server mode with any LINQ data source.

These new datasources can only be used with controls that support the IListServer (server mode) interface.

Thanks.

25 March, 2008
Ben Hayat

Thanks Mehul!

..Ben

25 March, 2008
Kavan Shaban

Hi,

Will this work for any Linq provider or are the DevEx Linq data sources specific to Linq2Sql.

Thanks,

Kavan

26 March, 2008
Scott Cate's WebLog

Today, I ran across the Developer Express ASP.NET blog , where they have several screen casts about using

27 March, 2008
Community Blogs

Today, I ran across the Developer Express ASP.NET blog , where they have several screen casts about using

27 March, 2008
Dan Wahlin's WebLog

I'm one of those developers that likes to build things myself mainly because the challenge is fun. 

28 March, 2008
Mehul Harry (DevExpress)

Hello Kavan,

These new LINQ datasources works with other LINQ providers as well. Support has tested and verified that LINQ to XML works fine.

Thanks.

28 March, 2008
DevInfox

Can some one sent me the code on Vb for the grid linq as posted in the XtraGrid Screencast

I can not figure out what goes with

Namespace Form1

    Public Partial Class Form1:Form

       Public Form1()

           InitializeComponet()

   End Class

29 March, 2008
Steven Smith

Mehul has a couple of screencasts up on his blog that demonstrate how to use their new LINQ datasource

31 March, 2008
Mehul Harry (DevExpress)

Hello Boris,

Sure, here you go:

Public Class Form1

    Sub New()

    InitializeComponent()

    linqServerModeSource1.QueryableSource = New DataClasses1DataContext().Customers

    End Sub

End Class

Thanks.

1 April, 2008
ctodx

In all the excitement of releasing both DXperience v2008 vol1 and our VCL Subscription build 34 on the

1 April, 2008
.Net World

Mehul has a couple of screencasts up on his blog that demonstrate how to use their new LINQ datasource

2 April, 2008
alexnikolof

Is the new Linq to SQL Data source supporting also Entity Framework

Database Objects

7 April, 2008
Mehul Harry (DevExpress)

Hi Alex,

Yes, the LINQ support will work any LINQ provider. I believe LINQ to Entities should work as well.

Thanks.

15 April, 2008
Emanuele Gigli

Hi,

is it possibile to use LinqServerMode with the PivotGridControl.

it's another control that need to be used too in server mode!

9 May, 2008
Mehul Harry (DevExpress)

Hi Emanuele,

Unfortunately the ASPxPivotGrid control cannot use the LinqServerModeDataSource. Take a look at the following issue for an explanation:

www.devexpress.com/.../Training.xml

Thanks.

9 May, 2008
The ASPx Blog

Check out this 4 minute video on a very useful feature in the 2008 vol 2 release. The video/screencast

10 July, 2008
mfe

Hello Mehul,

in Version 2008.2 it is possible to update data with the Webgrid and the LinqServerModeDataSource - But what's about Winforms? I found no issue to Update Linqdata with the XtraGrid.

Can you please help?

4 August, 2008
Mehul Harry (DevExpress)

Hello mfe,

About editing XtraGrid with LINQ server mode, please see this question in the support center:

www.devexpress.com/issue=Q104226

4 August, 2008
John Secada

the xtragrid video cannot be opened

12 September, 2008
Mehul Harry (DevExpress)

Hello John,

Thanks for letting me know. Since we moved the new tv.devexpress.com site, some of the links didn't get updated but I've updated this post to point to the correct videos.

12 September, 2008
The ASPx Blog - Mehul Harry's DevExpress Blog

Check out this in-depth LINQ integration with ASPxGridView video . This video updates an older LINQ video

24 June, 2009
Michael

I am new to DevExpress, so please forgive me if this question is not up to par.

In my project I want to use:

1. The DevExpress GridView

2. Linq to Sql

3. My own custom classes that are mapped to the Linq to Sql Entity Classes

4. LinqServerModeDataSource

I was wondering if there was a way that when I perform an Insert, Update or a Delete that I could execute my own code? For Ex.

When the user tries to Update an item from the Grid, I want to call my ProductManager.Save method.  The ProductManager Save method takes a ProductBO as a parameter. The Save method does the following:

1. Executes Custom Business Validation on the ProductBO.  If the validation fails, it throws an error

2. Maps the ProductBO to the Linq to Sql Product Entity.

3.  Saves the Linq to Sql Product Entity.

Is this possible?  If so how?

Thanks so much.

12 March, 2010
Mehul Harry (DevExpress)

Hi Michael,

I recommend asking that question in our forums. Also, check out these videos which cover some of those questions:

community.devexpress.com/.../video-how-to-use-linq-with-asp-net-gridview.aspx

community.devexpress.com/.../video-how-to-enable-editing-in-linqservermodedatasource.aspx

13 March, 2010
Michael

First,  I would like to say thanks for getting back to me so quickly.  I will check out the videos you mentioned as well as the forums.

My hope is the video's and/or forums will show me a way  to call the insert or update methods that I wrote instead of insert/update calls from the LinqServerModeDataSource.

Thanks so much.

15 March, 2010
Mehul Harry (DevExpress)

@Michael,

No problem. If you need further help then please contact our support team:

www.devexpress.com/.../CreateIssue.aspx

15 March, 2010
Sabas

Hi Mehul,

The feature is amaizing. Though how do you think, will it work fine with NHibernate Linq?

I'm asking because we use NHibernate but NHibernate Linq is rather young product and may not support everithing needed or the support may be poor in some parts.

What do you think? How to make sure?

Thanks in advance!

25 March, 2010
Mehul Harry (DevExpress)

Hi Sabas,

Yes, I love the ServerMode feature as well! :)

As for NHibernate, it seems that there maybe an issue on the NHibernate side, take a look at this:

www.devexpress.com/.../B142772.aspx

Hopefully, as LINQ 2 NHibernate matures, these issues will be resolved.

Thanks.

25 March, 2010
Abys

Thanks Mehul for the demo. I'm able to bind the xtraGrid to LinqServerModeSource but I couldn't find the ServerMode property (on DevExpress v2011) and even though I've specified the WaitAnimationOptions = Panel, nothing is being displayed. What are the possible reasons?

Thanks

15 August, 2012
Mehul Harry (DevExpress)

Abys,

You're referring to the WinForms XtraGrid so please post your question here and our support team can help you:

www.devexpress.com/.../Create

Thanks.

15 August, 2012

Please login or register to post comments.