私は剣道GridViewを使用しています。 onSearch関数を呼び出すと、Webページが突然更新されます。どうすればこの問題を解決できますか?なぜ私のWebページが突然リフレッシュされるのですか
これは私のグリッドです:
$("#grid").kendoGrid({
selectable: "row",
scrollable: false,
autoBind: false,
columns: [
{ title: "Status", width: '200px', template: '#if(Allowed){#Yes#}else{#No#}#' },
{ title: "Description", field: "Message" }
],
dataSource: vm.entity.MyDataSource
});
そして、これは私のコードです:
entity: {
MyDataSource: new kendo.data.DataSource({
transport: {
read: {
dataType: "json",
type: 'POST',
url: 'url goes here...',
data: {
code: function() { return '123' }
}
}
},
schema: {
data: "Data",
parse: function (data) {
return data;
}
}
}),
onSearch: function() {
vm.entity.MyDataSource.read();
}
}
すべてがOKであるとの結果が正しく返され、GridViewのは、ウェブページのデータではなく、1秒後に満たされています突然リフレッシュされます。
[Minimal、Complete、and Verifiable example](https://stackoverflow.com/help/mcve)に分離することはできますか? –