or
function create_markers_array_from_data (oData) { var max = oData.length, i = 0, markers_array = []; for(; i < max; i++) { markers_array.push({ location: [oData[i].lat, oData[i].long], tooltip: { template: "<div class='current_map_tooltip_container'><div id='wx-map-target"+oData[i].title+"' class='"+oData[i].content+"'></div></div>" } }); } return markers_array; }
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 } });//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; }At first, Thanks for kendo. it is used conveniently. but there are some ways I can't understand or I think it's not elegant.
1. $("#temp").kendoValidator().data("kendoValidator").validate() doesn't validate rules which I specify.
I add my rules in Validation to validate password and confirm password. when element loses focus, fantastic!!!! It does work. I really happily continue coding.
if( !$("#temp").kendoValidator().data("kendoValidator").validate() ){ return false;}<form> <input name="username" required /> <br /> <button id="save">Save</button> </form> <script> // attach a validator to the container $("form").kendoValidator({ validate: function(e) { console.log("valid" + e.valid); } }); </script>