As the title says, my grid is appending the data -- instead of replacing it -- when I refresh the table.
As far as I can tell, this isn't the intended behavior from Telerik, but I also can't find any settings to set this behavior.
I didn't build these components -- someone else did like 5 years ago. However, I did do the update from 2018-2023 so it's entirely possible I simply missed something.
Kendo UI version ^2023.2.718
And here's my code.
$('#CorrectiveActionsGrid').kendoGrid({
toolbar: ['excel'],
excel: {
fileName: 'CorrectiveActions.xlsx',
allPages: true,
},
dataSource: {
type: 'aspnetmvc-ajax',
transport: {
read: {
url: '/LoanAudit/GetAssignmentCorrectiveActions',
type: 'GET',
dataType: 'json',
data: { assignedToId: $('#ddlEmployee').data('kendoDropDownList').value() },
},
},
schema: {
type: 'json',
data: 'data',
total: 'total',
model: {
id: 'id',
fields: {
id: { type: 'string' },
loanNumb: { type: 'string' },
questionText: { type: 'string' },
note: { type: 'string' },
status: { type: 'string' },
caDueBy: { type: 'date' },
},
},
},
serverPaging: true,
serverFiltering: true,
serverSorting: true,
},
selectable: true,
change: function (arg) {
const selected = $.map(this.select(), function (item) {
return $(item).find('td').first().text();
});
const url = `/LoanAudit/CorrectiveAction/${selected}`;
window.open(url, '_blank');
},
filterable: true,
sortable: true,
pageable: {
refresh: true,
pageSize: 10,
pageSizes: [5, 10, 15, 20, 30, 'All'],
buttonCount: 5,
},
columns: [
{ field: 'id', filterable: true, title: 'Corrective Action Id' },
{ field: 'loanNumb', filterable: true, title: 'Loan Number' },
{ field: 'questionText', filterable: true, title: 'Action' },
{ field: 'note', filterable: true, title: 'Reviewer Note' },
{ field: 'status', filterable: true, title: 'Status' },
{
field: 'caDueBy',
filterable: true,
title: 'Due Date',
template: "#= (caDueBy == null) ? '' : kendo.toString(kendo.parseDate(caDueBy, 'yyyy-MM-dd'), 'MM/dd/yyyy') #",
},
],
});
Help?
Hi Dave,
How is the Grid refreshed - are you refreshing the whole page or clicking the Refresh toolbar button?
Regards,
Nikolay
Hi Matt,
I suggest opening a private support thread and sending us a Fiddler Jam log. The Fiddler Jam is one of the best ways to see the issue in action and includes Console logs/errors, Network Requests, Local/Session Storage logs, and a Screencast.
This will help us better understand the case and allow us to investigate further.
Regards,
Nikolay