Blogs

This Blog

Subscribe (RSS, Email)

Mehul Harry's DevExpress Blog

JavaScript, HTML 5, ASP.NET, DevExpress, ASP.NET MVC & WebForms, and News - Mehul Harry's DevExpress blog

ASP.NET Dynamic Data and DevExpress Grid

DevExpress Dynamic Data VideoCheck out this 12 minute ASP.NET Dynamic Data video which shows you how to:

  • Create a basic Dynamic Data website
  • Add LINQ to SQL objects (using Northwind database tables)
  • Replace the Microsoft GridView with ASPxGridView
  • Use the DevExpress LINQ Server Mode DataSource
  • Use Master Pages and Styles

Sound complicated? Don't worry, it's easy and kind of fun. Just follow these 3 steps:

1. Download File

This zip file contains the necessary code files mentioned in the video.

Click here to download: [DXDynamicData.zip]

2. Watch the video

Watch the DevExpress Dynamic Data Support video.

3. Leave feedback here

What do you think of ASP.NET Dynamic Data? Drop me a line here and let me know.

Published Feb 01 2009, 10:41 PM by
Bookmark and Share

Comments

Rory Becker - DevExpress

Very nice....Any chance of VB.Net versions of these files :) ?

February 2, 2009 6:49 AM

Rory Becker - DevExpress

Replacement FieldTemplates would also be very cool :)

February 2, 2009 6:50 AM

Mehul Harry (DevExpress)

Hey Rory,

Thanks and I'll look into getting a VB version for you.

February 2, 2009 1:33 PM

Scott Hunter

Mehul, this is GREAT stuff. Will blog about it next week!

February 3, 2009 3:41 PM

Clinton

Is there a vb.net version of the gridview

Thankyou.

February 5, 2009 3:46 AM

Mehul Harry (DevExpress)

Hi Bryan,

Thanks for the feedback. This release was just the first iteration. We plan to release an updated version which will include editor templates, dynamic validation, ...

I'll blog about it as soon as we it have it ready.

February 9, 2009 2:14 PM

Bryan Reynolds_1

Sounds great.

February 10, 2009 12:54 AM

web development india

Thats gr8, really nice to know that.

February 25, 2009 4:42 AM

Claude Lavoie

Hello Harry,

sounds great explication into your video.

Perhaps, I improving some bugs when I'm trying to rebuild my site after the importation of thoses 2 files (ASPxDynamicGrisView.cs, DynamicLinqServerModeDataSources.cs) into App_Code folder. Since I'm using VB as my language into my VisualStudio.... he really doesnt like your c# files compiling with the designer.vb's file. Do you have any alternative to help me please

Best Regards

Claude

March 6, 2009 8:28 PM

Scott Hunter

One of the things that we worked on supporting in Dynamic Data is the ability for third party controls

March 10, 2009 4:50 AM

Jeremy

First... Great work and great video.

I really want to use this on a current project. However, I'm having trouble getting this to work on my end.

Getting a compile error:

"The name 'DynamicDataManager1' does not exist in the current context"

I see it defined in the .ASPX file but it's like the code behind of the page template is having trouble resolving it.

Steps I've completed:

1. I've successfully built the "vanilla" Northwind Dynamic Data site using a LINQ to SQL data model (working).

2. I've copied the two new class files (ASPxDynamicGridView.cs & DynamicLinqServerModeDataSource.cs) into my "App_Code" directory.

3. I've copied the four custom 'PageTemplate' files into the DynamicData\PageTemplates folder.

4. Added references to the 5 needed DevEx assemblies and set their "Copy Local" attribute to true so they appear in the project BIN folder.

5. I've updated the Global.asax file as outlined in the video

I'm using v8.3 of DevExpress controls. Am I missing something? Anyone else seeing this same issue when following the video directions and beginning from scratch?

- Jeremy

April 22, 2009 4:12 PM

Jeremy

OK - After a good night's rest and taking another look @ the problem I've identified the difference that was causing me issues... ASP.NET Project Types.

The sample relies on using an ASP.NET “Web Site” project template while I was taking the more traditional “ASP.NET Web Application” solution/project template approach. I was able to use the ASP.NET “Web Site” approach to follow the instructions in the video exactly and everything worked perfectly on the first try.

Now, for several valid reasons I need to work with “ASP.NET Web Application” projects and not ASP.NET “Website” projects. The thing that was preventing me from moving forward with the sample was that “ASP.NET Web Application” projects require .ASPX pages to have not only a “.ASPX.CS” code-behind file but also a “.ASPX.DESIGNER.CS” file as well… “ASP.NET Website” projects do not have this added .DESIGNER.CS file requirement.

I’ve manually recreated the ‘DevExList’ control in a separate project and have gotten all the issues resolved up to the point of trying to get the ‘ASPxDynamicGridView’ control visible in the design file… which is where I’m getting stuck.

Could someone there @ DevExpress run through this scenario and see if they can get it working for ‘ASP.NET Web Application’ project types?

April 23, 2009 2:32 PM

Jeremy

Hmmm... OK different issue. Does the 'ASPxDynamicGridView' control understand 'System.ComponentModel.DataAnnotations' markup? If not this is a dead-end for me.

i.e. - If I want to turn a column off using extended Metadata attributes? [ScaffoldColumn(false)] or define an alternate display name [DisplayName("Some Column Name Override")]

- Jeremy

April 23, 2009 2:57 PM

Mehul Harry (DevExpress)

Jeremy,

We haven't tested Dynamic Data web apps much, mostly just the web sites. Web apps probably require different template pages. In general though, the markup should remain the same.

To make the ScaffoldColumn attribute work, replace the ASPxDynamicGridView.AddDataColumns method with this one

void AddDataColumns(MetaTable meta) {

   foreach(MetaColumn column in meta.Columns) {

       if(!column.Scaffold)

           continue;

       AddDataColumn(column);

   }

}

(column.Scaffold check added)

The DisplayName attribute functions properly.

Thanks.

June 25, 2009 3:57 AM

Tristen Lopez

Have you had any progress on releasing a VB version?

Thanks!

August 21, 2009 2:49 PM

The ASPx Blog - Mehul Harry's DevExpress Blog

I have good news for Visual Basic developers interested in the DevExpress Dynamic Data Grid called the

September 14, 2009 5:58 PM

Graham Charles

I'm getting the same error --

"The name 'DynamicDataManager1' does not exist in the current context"

As Jeremy, using v9.3 of the controls. Any advice?

Thanks,

g.

April 29, 2010 3:55 AM

Mehul Harry (DevExpress)

@Graham,

Did you see my reply to @jeremy as well @jeremy's own response about the project type?

April 29, 2010 5:35 PM

Mos

Can you update and post the files for ASP.NET 4.0 and also DevExpress 10.1.3?

May 7, 2010 6:54 PM

Mehul Harry (DevExpress)

@Mos,

Not sure about 10.1.3 yet but we'll consider it for a future release. Thanks.

May 8, 2010 4:43 PM

Mos

Can you maybe just update the files for V10.1.3 and post them to the blog.  I am evaluating this control for a project that I am developing & really need this capability but, was hoping that I would have this ability if I bought the DevExpress controls.  Can you please make an effort to update the files and post them?

Thanks,

Mos

May 12, 2010 7:58 PM

Luis Valencia Muñoz

We are doing a dynamic data with aspxgridview proof of concept I have the following errors:

I tried to add references to, but it says they are on the project.  I checked the bin folders but neither dlls are there.

using DevExpress.Data.Linq;

using System.Data.Linq;

using System.Linq;

Error      1              The type or namespace name 'LinqServerModeDataSource' could not be found (are you missing a using directive or an assembly reference?)                D:\EPM.ControlPerdidasGAS\EPM.ControlPerdidasGASLineaBase\SlnEPM.ControlPerdidasGAS\EPM.Gas.CorePerdidas.SitioPerdidas\App_Code\DynamicLinqServerModeDataSource.cs                9              52           localhost/EPM.Gas.CorePerdidas.SitioPerdidas

Error      2              The name 'ContextTypeName' does not exist in the current context                D:\EPM.ControlPerdidasGAS\EPM.ControlPerdidasGASLineaBase\SlnEPM.ControlPerdidasGAS\EPM.Gas.CorePerdidas.SitioPerdidas\App_Code\DynamicLinqServerModeDataSource.cs                17           41           localhost/EPM.Gas.CorePerdidas.SitioPerdidas

Error      5              The name 'TableName' does not exist in the current context                D:\EPM.ControlPerdidasGAS\EPM.ControlPerdidasGASLineaBase\SlnEPM.ControlPerdidasGAS\EPM.Gas.CorePerdidas.SitioPerdidas\App_Code\DynamicLinqServerModeDataSource.cs                24           26           localhost/EPM.Gas.CorePerdidas.SitioPerdidas

August 31, 2010 2:37 PM

Mehul Harry (DevExpress)

@Luis,

The LinqServerModeDataSource is part of the DevExpress.Data.Linq assembly which you'll need to reference in your project:

documentation.devexpress.com

August 31, 2010 2:43 PM

Luis Valencia Muñoz

I already referenced it, but still doesnt compile I am using latest version of the controls.

Other strange thing is that the dlls dont appear on the bin, I guess its because they are in the GAC so they get referenced in the web.config

August 31, 2010 2:54 PM

Luis Valencia Muñoz

web.config

<add assembly="DevExpress.Data.v10.1, Version=10.1.5.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>

<add assembly="DevExpress.Data.v10.1.Linq, Version=10.1.5.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>

<add assembly="DevExpress.Web.v10.1, Version=10.1.5.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>

<add assembly="DevExpress.Web.ASPxGridView.v10.1, Version=10.1.5.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>

August 31, 2010 2:56 PM

Bryant Farley

Having problems as well with using the VB sample and latest version (10.1.6.0) of controls. No compilation errors when building site, but errors when trying to run the page.

November 14, 2010 12:49 PM

Mehul Harry (DevExpress)

Hi Bryant,

We're looking into the latest Dynamic Data support and I'll have some more news for you soon. Keep an eye on this blog in the meantime:

http://devexpress.com/mehul

Thanks!

December 20, 2010 2:32 PM

About Mehul Harry (DevExpress)

Mehul Harry is an ASP.NET technical evangelist at Developer Express. You can reach him directly at mharry@DevExpress.com. You can also follow him on Twitter: http://twitter.com/mehulharry
LIVE CHAT

Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

FOLLOW US

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2014 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners