RadControls and ASP.NET Dynamic Data - Update

by ASP.NET AJAX Team | Comments 15

UPDATE: You can download the latest Dynamic Data bits from here.

We have been working for some time to integrate RadGrid in the ListDetails page template. I am pleased to announce that this is now a fact. You can use a modified version of ListDetails.aspx bundled with RadGrid. See for yourself:



You can download the bits from here. They are tested with the latest Dynamic Data bits which you can grab from here.

I would like to thank David Ebbo for his continuous support and help. Also a big thank you to my colleague Vlad (our local RadGrid expert) who provided invaluable assistance with the technical implementation.

About the author

Iana Tsolova

Iana Tsolova

is Program Manager of Telerik’s ASP.NET AJAX division. She joined the company back in the beginning of 2008 as a Support Officer and has since occupied various positions at Telerik, including Senior Support Officer, Team Lead at one of the ASP.NET AJAX teams and Technical Support Director. Iana’s main interests are web development, reading articles related to geography, wild nature and latest renewable energy technologies.

15 Comments

Adam Greene
I am having some issues trying to integrate RadGrid into my Dynamic Data site. This post was on 5/22, and the very next day, 5/23, a new release of Dyn Data was posted on http://code.msdn.microsoft.com/dynamicdata so I am not clear which version of Dyn Data this was tested with, but I am using Visual Studio 2008 SP1 Beta and the Dyn Data bits that come with it. When I try to incorporate the RadGrid bits, I get the following error when I try to open your version of ListDetails.aspx in the Visual Studio designer: Error Rendering Control - UpdatePanel1. The control collection cannot be modified during DataBind, Init, Load, PreRender, or Unload phases. If I ignore the designer error and attempt to run the site, in your ListDetails.aspx, this line: DynamicDataManager1.RegisterControl(RadGrid1); generates the following exception: [NotImplementedException: The method or operation is not implemented.] System.Web.DynamicData.BaseDataControlAdapter.set_DataKeyNames(String[] value) +54 System.Web.DynamicData.DynamicDataManager.ConfigureDataGroup(DynamicDataGroup dataGroup) +630 System.Web.DynamicData.DynamicDataManager.RegisterControl(Control control) +322 ListDetails.Page_Init(Object sender, EventArgs e) in c:\Documents and Settings\Adam Greene\My Documents\Visual Studio 2008\WebSites\BSN.DynamicDataEntities\DynamicData\PageTemplates\ListDetails.aspx.cs:17 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnInit(EventArgs e) +99 System.Web.UI.Page.OnInit(EventArgs e) +12 System.Web.UI.Control.InitRecursive(Control namingContainer) +333 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378 Any suggestions?
Adam Greene
Just an update: I have tried your code with the updated 5/23 release of Dynamic Data. ListDetails.aspx still causes a designer error: Error Creating Control - UpdatePanel1 Value cannot be null, Parameter name: httpContext The good news is that is I ignore this error, the site does MOSTLY build & run properly now, although there are some javascript errors when I try to do things like edit/insert/update/cancel.
Atanas Korchev
Hi Adam, Indeed there is an error in design time. Fortunately the fix is easy - just add these two lines in the OnInit method of the DynamicGrid control (in App_Code): if (DesignMode) return; As for the second error - I couldn't reproduce it. Everything worked fine on my end using the current Dynamic Data Bits and the modified ListDetails.aspx. Any additional info would help me track the problem.
Primož Krajnik
THANK YOU so much for doing this work for us all. I keep getting "'System.Web.DynamicData.IControlParameterTarget' is inaccessible due to its protection level" on public class DynamicRadGrid : RadGrid, IControlParameterTarget, IPersistedSelector class. Why would that be? I am frustrated because the source doesn't compile. regards. Primoz
Atanas Korchev
You are probably using an older version of ASP.NET Dynamic Data where that interface wasn't public. Please try upgrading to the latest bits. Make sure you have uninstalled the older bits first.
John
Yes, Update to latest one, than run ok!
Brett
Null checks need to be added to the FieldTemplates ie. in the ExtractValues method of DateTime_Edit.ascx.cs RadDatePicker will fail trying to convert DbSelectedDate.ToString() if the value is null.
Dogu Tumerdem
Hi, I have integrated this to my project but no data displayed on grid and details. My case is a little complicated : 1. My dbml file is in a dll which is imported (Meta data are ok) 2. I am using Web Application, NOT website. But It was working properly with datagrid.
Dogu Tumerdem
Ok I solved it that was my mistake...
João Zabotto
Hi  
 
I am making some tests with Dynamic Data, I would like to know how I do to use all the controls of  telerik, altering PagesTemplate, because I am not managing to do to work the options of  to Delete, to Update and to Insert for RadGrid, as I do for this to work??? 
 
Thanks

João Zabotto
Erik
Hi all (bv-ers)

I have an working example, tranlated from C# in VB.NET

I will post it shortly, but questions are welcome.

I have the grid working on the List.asp AND the listDetails.asp (with popup editing, nice!)

For info just mail me.

Grz Erik

Erik
Hi all,

I have created a sample project and have submitted it to Telerik by support ticket.

Meanwhile you can contact me trough my website contact form for a download link.

Also we are testing with a combination of MVC, Dynamic Data and Telerik controls 
And we are testing with a formview (edit/insert pages) and a dynamicly created template with dynamic controls.

Grz all,

Erik
John
Hi,

I am having a trouble integrating my Dynamic Data Web Application with Telerik controls. Can anyone help me on this.
Jeff Circeo
Are there any plans to update this to the current version of Dynamic Data?            

Comments

  1.    
      
      
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)
Read more articles by ASP.NET AJAX Team - or - read latest articles in Developer Tools