Change datasource type with Mvc wrapper

2 posts, 0 answers
  1. Luciano Kaesemodel
    Luciano Kaesemodel avatar
    29 posts
    Member since:
    Apr 2007

    Posted 24 Nov 2014 Link to this post


    I have a Ajax grid, like that :

      .Columns(columns =>  {
          columns.Bound(model => model.Id).Hidden(true);
          columns.Bound(model => model.First);                              
          columns.Bound(model => model.Email);                          
       .Groupable(y => y.Enabled(true))
       .Sortable(x => x.SortMode(GridSortMode.MultipleColumn))
       .Pageable(x => x.PageSizes(true).Messages(messages => messages.Empty("")))
       .DataSource(dataSource => dataSource
          .Model(model => model.Id(p => p.Id))
          .Read(read => read.Action("List", "Employee").Type(HttpVerbs.Post)))

    The javascript generated included the datasource type 'aspnetmvc-ajax':
    "dataSource":{"type":(function(){if(['aspnetmvc-ajax']){return 'aspnetmvc-ajax';} else{throw new Error('The kendo.aspnetmvc.min.js script is not included.');}})()

    I dont want that. I´d like to takeoff that type. 
    How can I change/takeoff the automatic type generated?

  2. Daniel
    Daniel avatar
    2231 posts

    Posted 26 Nov 2014 Link to this post


    You can use the DataSource Custom builder:
    .DataSource(dataSource => dataSource
    if you do not wish to use the default dataSource type for the wrapper.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top