hello
i don't know why, but my code send a duplicate request to the web API
please help me with this.
jquery code:
<body>
<div id="grid"></div>
</body>
<script>
$(document).ready(function ()
{
var dataSource = new kendo.data.DataSource(
{
autoSync: false,
transport:
{
read:
{
url: '/api/test/GetAllRecords',
dataType: "json"
},
create:
{
url: '/api/test/AddNewRecord',
dataType: "json",
method: "GET"
}
},
schema:
{
data: "results",
model: {
id: "PolicyId",
fields: {
PolicyId: { type: "number", validation: { required: true, min: 1 }},
PolicyName: { validation: { required: true } },
PolicyDeletionPeriod: { type: "number", validation: { required: true, min: 1 } }
}
}
},
pageSize: 100
});
$("#grid").kendoGrid(
{
dataSource: dataSource,
toolbar: [{ name: "create", text: "Create new row" }],
editable: "popup",
columns: [
{ field: "PolicyId", title: "PolicyId" },
{ field: "PolicyName", title: "PolicyName" },
{ field: "PolicyDeletionPeriod", title: "PolicyDeletionPeriod" }
]
});
});
</script>
</body>
blue is my request the second I don't know why happened
Hi Valery,
Thank you for sharing the Grid declaration.
As far as I can see it looks good and it's hard for me to determine what might be the cause of it without having the full implementation. Could you please share a runnable Dojo demo where the problem is isolated and replicated? Having this will help me fully understand the case and allow me to advise further.
Regards,
Nikolay