I am using the Grid, but manipulating the URL with search parameters. The first page works great, showing the total rows, number of pages, etc. When navigating to other pages, I can see that the grid is successfully generating and hitting the URL. Within the change() event, I can see the correct rows returned. However, the grid is not updating with the new content. Is there something else I need to do?
Here is the grid definition
<
kendo-grid
ref
=
"gridComponent"
:data-source
=
"quotes"
:auto-bind
=
"true"
:selectable
=
'true'
:sortable
=
'true'
:resizable
=
'true'
:pageable-page-size
=
"pageSize"
:pageable-page-sizes
=
'true'
:pageable-button-count
=
'5'
:reorderable
=
'true'
:no-records
=
"noRecords"
v-on:databinding
=
"onDataBinding"
v-on:databound
=
"onDataBound"
v-on:change
=
"rowSelected"
:sort
=
"sortFilter"
>
computed: {
quotes: function () {
let vue = this
// eslint-disable-next-line
return new kendo.data.DataSource({
transport: {
read: {
url: this.queryString,
beforeSend: function (xhr) {
// xhr.setRequestHeader('Access-Control-Allow-Origin', '*')
xhr.setRequestHeader('Authorization', Constants.AUTH_KEY)
},
type: 'GET',
dataType: 'json'
}
},
schema: {
total: function (response) {
let records = 0
if (response && response.length > 0) {
records = response[0].Count
}
return records
}
},
pageable: 'true',
pageSize: 10,
serverPaging: 'true',
// testing the change event handler
change: function (e) {
// let data = this.data()
},
requestStart: function () { vue.loading = true },
requestEnd: function () { vue.loading = false }
})
},
queryString () {
var me = this.$store.getters.user
var agentNumber = me.userName
var searchURLstring = `${Constants.SEARCH_URL}?AgentNumber=${agentNumber}`
if (this.currentPolicyNo) {
searchURLstring += `&QuoteNumber=${this.currentPolicyNo}`
}
if (this.currentInsuredName) {
searchURLstring += `&InsuredName=${this.currentInsuredName}`
}
if (this.currentAddr1) {
searchURLstring += `&Address=${this.currentAddr1}`
}
if (this.currentSortField) {
searchURLstring += `&sortField=${this.currentSortField}`
searchURLstring += `&sortDirection=${this.currentSortField}`
}
searchURLstring += `&SearchScope=${this.searchScope}`
return searchURLstring
}
}