c# - Uncaught TypeError: Cannot read property 'replace' of undefined -
I am new to using the Kendo grid and the Kindo UI. My question is how can I solve this error
The property can not read 'replace'. This is my code on my computer.
error
rowTemplate: kendo.template ($ ("# rowTemplate"). Replace ('k-alt', ' ')), HTML of the line template
& lt; Script id = "rowTemplate" type = "text / x-kendo-tmpl" & gt; & Lt; tr class = 'k-alt' & gt; & Lt; TD & gt; $ {First name} $ {last name} & lt; / Td> & Lt; / TR & gt; & Lt; / Script & gt; thanks :)
I think the element to jQuery can not be found .
Find the first element
var rowTemplate = document.getElementsByName ("RowTemplate"); or
var rowTemplate = document.getElementById ("RowTemplate"); or
var rowTemplate = $ ('# rowTemplate'); Then try your code again
rowTemplate.html (). Replace (....)
This question is already available:
Comments
Post a Comment