jQuery UI Widgets › Forums › Grid › Grid Error w/ Vue — Cannot read property 'beforeLoadComplete' of undefined"
Tagged: beforeLoadComplete, datagrid vue, grid, vue
This topic contains 1 reply, has 2 voices, and was last updated by admin 4 years, 5 months ago.
-
Author
-
September 25, 2020 at 4:45 pm Grid Error w/ Vue — Cannot read property 'beforeLoadComplete' of undefined" #113161
Hello
I am now moving from the test project which was created based from your demos into my application.
I have everything configured correctly so far as I can tell, but I am receiving an error when trying to view in my application
When the page loads, I receive error in browser
crm.js:144455 [Vue warn]: Error in data(): “TypeError: Cannot read property ‘beforeLoadComplete’ of undefined”
found in
—> <Crm> at resources/js/components/crm/CRM.vue
<Root>Here is my component (note, the jqwidgets css is being loaded in the page which calls this component)
`vue
<template>
<div class=”crm-container”>
<div class=”crm-detail” style=”display: block”>
<JqxGrid
ref=”crm-people-grid”
height=”100%”
width=”100%”
:source=”peopleAdapter”
selectionmode=”multiplerows”
:columns=”peopleColumns”
:sortable=”true”
theme=”light”
></JqxGrid>
</div>
</div>
</template><script>
import JqxGrid from “jqwidgets-scripts/jqwidgets-vue/vue_jqxgrid.vue”export default {
components: { JqxGrid },
props: {
config: { type: String, default: “” },
},
data() {
return {
peopleAdapter: new jqx.dataAdapter(this.peopleList),
peopleColumns: [
{ text: “ID”, datafield: “id”, hidden: true },
{ text: “Name”, datafield: “full_name” },
],
}
},
beforeCreated() {
this.peopleList = {
datatype: “array”,
localdata: [{id: 1, full_name: “Mike Erickson”}],
datafields: [
{ name: “id”, type: “number” },
{ name: “full_name”, type: “string” },
],
}
},
}
</script>
<style scoped lang=”scss”>
</style>`
September 27, 2020 at 7:57 am Grid Error w/ Vue — Cannot read property 'beforeLoadComplete' of undefined" #113170Hi,
There is syntax error in the provided code in two places “{ name: “full_name”, type: “string” },” the “,” should be removed. The “,” on the next line should be removed, too.
Best regards,
Peter StoevjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.