Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Team,
I am using below url to get data from server

'http://localhost:60661/api/Books/GetBook/' + AppContext.Unit+ '/Chapter'

as above i want to pass 'AppContext.Unit' value dynamically through API URL using kendo autocomplete widget.


Regards
Nanda Kishore.CH

What I have tried:

$("#txtautoceeec1ec6d4164bc4398").kendoAutoComplete({
filter: "startswith",
minLength: 2,
dataSource: new kendo.data.DataSource({
serverFiltering: true,
transport: {
read: {
url: Utility.GetBaseUrl('LocalServer') + 'Books/GetBook/'+ AppContext.Unit '/Chapter'

},
type: 'get',
parameterMap: function (data, action) {
debugger;
var newParams = {
searchtext: data.filter != null ? data.filter.filters[0].value : null,
filtercriteria: data.filter != null ? data.filter.filters[0].operator : null
};
return newParams;
}
}
}),
dataTextField: "BookName",
dataValueField: ""
});
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900