Can someone help me figure out why my method
checkboxToggle()
is not working when I click on the checkbox?Here is the code snippet:
` Methods:{
toggleTemplate(){
let template =
`<label class="switch" >
<input type="checkbox" class="user-status" # if(Status){#checked#} # v-on:click="checkboxToggle()"/>
<span class="slider round"></span></label>`;
let compiledTemplate = kendo.template(template);
return compiledTemplate.bind(this);
},
checkboxToggle(){
//TODO Grid checkbox template event binding not working
alert("Checkbox Toggle !!!")
}
}
Another question
<kendo-datasource ref="localDataSource" :data="filteredUsers"
:group='groupingFiled'>
</kendo-datasource>
<kendo-grid :height="500" :data-source-ref="'localDataSource'" :resizable="true"
:filterable="false":sortable-allow-unsort="true":sortable-show-indexes="true"
:scrollable-virtual="true" :pageable-numeric="false"
:pageable-previous-next="false" :pageable-messages-display="'Showing {2} users'"
:editable="'popup'":toolbar="[{name: 'excel', text: 'Excel'}]"
:excel-file-name="'Motadata_UserListing.xlsx'" :excel-filterable="true" >
<kendo-grid-column :selectable="true" :width="35"></kendo-grid-column>
<kendo-grid-column :field="'UserId'" :hidden="true"></kendo-grid-column>
<kendo-grid-column :field="'UserName'" :width="150"></kendo-grid-column>
<kendo-grid-column :field="'UserType'":width="180"></kendo-grid-column>
<kendo-grid-column :field="'Role'" :width="120"></kendo-grid-column>
<kendo-grid-column :field="'AssignedGroups'" ></kendo-grid-column>
<kendo-grid-column :field="'Email'":width="210" ></kendo-grid-column>
<kendo-grid-column :field="'Description'":width="200" ></kendo-grid-column>
<kendo-grid-column :field="'Status'"
:width="170"
:template="this.toggleTemplate()"></kendo-grid-column></kendo-grid>
I would appreciate any help with this issue. Thank you.