Dialect on Ajax DataSource

2 posts, 0 answers
  1. Jeff
    Jeff avatar
    28 posts
    Member since:
    Aug 2010

    Posted 16 Aug 2012 Link to this post

    I need to control how ajax parameters are sent to my controller as parameters. I can do this in javascript using the dialect api...but I can't find how to do this with the MVC wrappers.

    Any suggestions? I have:

    @model CabIt.Web.ViewModels.AddressViewModel
     
    @(Html.Kendo().AutoCompleteFor(a => a).Name("fromAddress").DataTextField("Name")
          .DataSource(source => source.Read(read => read.Action("/", "Api/Addresses"))
                                    .ServerFiltering(true)))


    I want to call the method:

    public class AddressesController : ApiController
    {  
        public IEnumerable<AddressViewModel> Get(string id)
        {
            return AddressViewModel[0];
        }
    }
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 17 Aug 2012 Link to this post

    Hello Jeff,

     It is not possible to change the way ajax parameters are sent because the DataRequestAttribute relies on that. If you need full control over that consider using the JavaScript only version of Kendo Grid.

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top