This is a migrated thread and some comments may be shown as answers.

Access created method vuejs in kendo grid?

8 Answers 410 Views
This is a migrated thread and some comments may be shown as answers.
Felipe
Top achievements
Rank 1
Felipe asked on 28 Nov 2017, 01:36 PM

Is it possible to access a method that was created in the Vue.JS methods with the Telerik grid, in this case a click action?

template: "<div><button @click='showClient(#:id#)'>Show Client</button></div>"

methods: {

     showClient (id) {

           console.log(id)

          this.$router.push('/client/:id')

     }

}

output render in HTML

<td role="gridcell"><div><button @click="showClient(720)">Show Client</button></div></td>

8 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 30 Nov 2017, 08:14 AM
Hello,

Thank you for getting in touch with us. With the current version of Grid Vue wrapper the Vue templates support is not implemented yet we plan to add support for them in the upcoming January release. Currently in such scenario we recommend the Kendo jQuery template syntax that will work correctly. Please excuse us for this current inconvenience with the control. If you have further questions please don't hesitate to let us know.

Regards,
Plamen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
nick
Top achievements
Rank 1
answered on 27 Feb 2018, 06:25 PM
Was this support added in the January release or version 2018.1.221?
0
Plamen
Telerik team
answered on 01 Mar 2018, 12:04 PM
Hello,

Yes - you can use Vue components as templates in Kendo-Vue-UI components as for example it is described in this issue.

Regards,
Plamen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
nick
Top achievements
Rank 1
answered on 05 Mar 2018, 02:31 PM
Thanks for the response.I was able to use a link as a workaround:
<a href='javascript:void(0)' @click.prevent='navigate'></a>
 in the grid template but not a Vue router link like:
<router-link to="/route"></router-link>
.
0
Plamen
Telerik team
answered on 07 Mar 2018, 11:55 AM
Hello,

Yes indeed in the current version router-link rendering inside the template is not supported. 

Regards,
Plamen
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
ZHAO
Top achievements
Rank 1
answered on 28 Apr 2018, 07:39 AM

hi,

     I use the version "@progress/kendo-grid-vue-wrapper": "^2018.1.313" and "@progress/kendo-ui": "^2018.1.312", but @click is doesn't work in the colmuns.template.   could you give me some help?

0
Felipe
Top achievements
Rank 1
answered on 28 Apr 2018, 04:22 PM
ZHAO https://alligator.io/vuejs/global-event-bus/
0
Plamen
Telerik team
answered on 02 May 2018, 08:12 AM
Hi,

You can refer to this issue where an example is provided with a similar behavior. It is important to pass the properties that you need in the template in the templateArgs object and declare it in the template component.

Hope this information will be helpful.

Regards,
Plamen
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Felipe
Top achievements
Rank 1
Answers by
Plamen
Telerik team
nick
Top achievements
Rank 1
ZHAO
Top achievements
Rank 1
Felipe
Top achievements
Rank 1
Share this question
or