Hi,
I am able to Read/Get the list of items with Crud Read. But I am not able to pass the parameter to get a list of items through crud Read.Please see below demo(writer.js ;line 304)
I am trying to send full object of writer(on edit) and take writerID to get list of Agents on popup agents tab.
Thanks,
Chatrapathi Chennam
I am able to Read/Get the list of items with Crud Read. But I am not able to pass the parameter to get a list of items through crud Read.Please see below demo(writer.js ;line 304)
function BuildAgentGrid(model) { var crudServiceBaseUrl = window.applicationBaseUrl + 'api/WebApi'; agentdataSource = new kendo.data.DataSource({ transport: { read: { url: crudServiceBaseUrl + "/GetAgentbyWriterIDData/", data: { WriterModel: model }, contentType: "application/json" }, parameterMap: function (options, operation) { if (operation == "read") { return kendo.stringify(options.WriterModel); } } }, batch: true, pageSize: 10, serverPaging: true, serverFiltering: false, serverSorting: true, schema: { model: { AgentID: "AgentID", Name: "Name", IsActive: "IsActive", fields: { AgentID: { type: "string" }, Name: { type: "string", validation: { required: true} }, IsActive: { type: "boolean" } } } }, filter: { "field": "IsActive", "operator": "IsEqualTo", "value": true } });I am trying to send full object of writer(on edit) and take writerID to get list of Agents on popup agents tab.
//Web Api Controller //param:Data :Expected full object of WriterModel on Edit as parameter public List<Agent> GetAgentbyWriterIDData(Object Data) { //Get writerID from data object and pass writerID to get list of AgentList //trying to return the Agent list based on writerID of WriterModel; return null; }Thanks,
Chatrapathi Chennam