This is a migrated thread and some comments may be shown as answers.

Dialect on Ajax DataSource

1 Answer 75 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 17 Aug 2012, 04:56 AM
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];
    }
}

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 17 Aug 2012, 06:41 AM
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!
Tags
General Discussions
Asked by
Jeff
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or