Telerik blogs
  • Web ASP.NET MVC

    MVC3 and unobtrusive validation support with Grid for ASP.NET MVC

    As you may know, we just released our ASP.NET MVC extensions latest service pack. Beside the regular dose of fixes, this service release incorporates even better support of the official version of MVC3. One of those new MVC3 feature, which I want to bring to your attention, is the unobtrusive validation.   We all know how client validation from the previous version of MVC has worked; outputting a mass of JSON serialized validation rules. Although, this approach is still available, the newer one is far more pleasing. Enabled by default in the VS2010’s MVC3 project template, validation rules will be attached...
    January 20, 2011
  • Release

    MVC 3 and the Telerik Extensions for ASP.NET MVC

    Last week MVC 3 RTM was released. I’ve been able to play around with the various release candidates and I have to say that I love the new changes, especially the new Razor ViewEngine. For those of you that have not been looking into the changes for MVC 3, or you are just starting to look into MVC, I wanted to first introduce the Razor ViewEngine and then show you how to use the syntax with some of our extensions for ASP.NET MVC. First up is the Razor ViewEngine. Now a ViewEngine is essentially what takes all of the code in...
    January 20, 2011
  • Web ASP.NET MVC

    Binding Telerik Grid for ASP.NET MVC to OData

    We have just made a nice demo application showing how to bind Telerik Grid for ASP.NET MVC to OData using Telerik TV as OData producer. The grid supports paging, sorting and filtering using OData’s query options. To do that we implemented a helper JavaScript routine (defined in an external JavaScript file which is included in the sample project) which is used to bind the grid. Here is how the code looks like: @(Html.Telerik().Grid<TelerikTVODataBinding.Models.Video>() .Name("Grid") .Columns(columns => { columns.Bound(v => v.ImageUrl).Sortable(false).Filterable(false).Width(200).HtmlAttributes(new { style="text-align:center" }); ...
    December 16, 2010
  • Web ASP.NET MVC

    Binding to a collection of dynamic objects with Grid Extension for ASP.NET MVC

    Great news everybody! With its latest version and the addition of MVC3 specific build, you can now bind the MVC Grid to a collection of dynamic objects quite easily. Note that we will be using the new Razor view engine for extra fun. Just declare the View’s model to be IEnumerable<dynamic> 1: @using Telerik.Web.Mvc.UI 2: @model IEnumerable<dynamic> 3: @( 4: Html.Telerik().Grid(Model) 5: .Name("Grid") 6: .Columns(columns...
    November 12, 2010
  • Web ASP.NET MVC

    Using nested complex objects with ASP.NET MVC editor templates

    This may be common knowledge but I failed to quickly find the relevant info when it hit me. In short the default editor template generated by ASP.NET MVC 2 ignores any nested complex properties of your model. Here is a short example which demonstrates the case:   Model: public class Customer{ public int ID { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public Address Address { get; set; }} public class Address{ public string Street { get; set; } public string City { get; set; }} Controller: public class HomeController : Controller{ // // GET: /Home/ public ActionResult Index() { return View(new Customer { ...
    September 30, 2010