Telerik blogs

Latest

For the latest product updates, please visit Release.

  • Web ASP.NET MVC

    Resolving circular references when binding the MVC Grid

    Sometimes when performing ajax databinding with the MVC grid you may end up with unexpected result: server error 500. What is even stranger is that server-side binding works as expected with the same data binding code. Let’s demystify this problem: The problem You will see the following  if you use FireBug or Fiddler to inspect the response: The error message is “A circular reference was detected while serializing an object of type” followed by some type. If you google this up you will find out that this exception is thrown by the JavaScriptSerializer class because of circular references detected. “What the heck is a...
    January 25, 2010
  • Web ASP.NET MVC

    Using Silverlight Upload control with ASP.NET MVC

    [Download the complete final project] We got a customer inquiry today about how to integrate the Telerik Silverlight Upload control within an ASP.NET MVC site. This is quite an interesting scenario, especially with the new Drag and Drop from the file system coming with our Silverlight 4 release in the mid-March. I was not sure what should be done to run the SL upload in the MVC site. This was my first time experience with ASP.NET MVC 2 and it turned out to be a very pleasant and easy one. These are the steps that need to be followed: 1. Create an ASP.NET MVC site: 2....
    January 15, 2010
  • Web ASP.NET MVC ASP.NET AJAX

    Using Telerik Extensions for ASP.NET MVC within an ASP.NET WebForms application

    If you really, really like the new and shiny extensions, you can use them in your WebForms application, too! Here are the needed steps: Add references to the following assemblies: System.Web.Abstractions System.Web.Routing System.Web.Mvc Telerik.Web.Mvc The first three are usually in the GAC. Copy the Content and Scripts folders from the extensions’ distribution into your project. The pages which will contain the MVC components will need to inherit System.Web.Mvc.ViewPage. Also, you should mock an MVC environment, like this: protected class ControllerMock : Controller { public ControllerMock(NameValueCollection queryString) { foreach (string param in queryString.Keys) ...
    December 18, 2009
  • Web ASP.NET MVC

    Telerik Extensions for ASP.NET MVC now support ASP.NET MVC2 RC

    As many of you know yesterday ASP.NET MVC 2 RC was released. We did our best to make Telerik Extensions for ASP.NET MVC compatible with that release and I am glad to announce that you can now download the updated bits from here (open source) or here (licensed). Changes There are a few things that changed: We are now producing two dll files – one for ASP.NET MVC 1 and one for ASP.NET MVC 2. The files differ only in their version: For ASP.NET MVC 1 applications you should use Binaries\Mvc1\Telerik.Web.Mvc.dll. Its assembly version ends with 135 (which means MVC v1 .NET...
    December 18, 2009
  • Web ASP.NET MVC

    Using ViewModel objects to improve the Ajax performance of Telerik Grid for ASP.NET MVC

    In this blog post I will demonstrate how to squeeze the most from Telerik Grid for ASP.NET MVC when using Ajax binding. Lets start with a simple grid bound to the Northwind Orders table: View: <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<UsingDto.Models.Order>>" %><asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server"> Home Page</asp:Content><asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server"><%= Html.Telerik().Grid(Model) .Name("Grid") .Columns(columns => { columns.Add(o => o.OrderID).Width(100); columns.Add(o => o.Customer.ContactName).Width(200); ...
    November 10, 2009