저는 검도 그리드 및 검도 UI를 처음 사용했습니다. 내 질문에 내가이 오류를 Uncaught TypeError : undefined의 'replace'속성을 읽을 수 없습니다. Grid에서
<script id="rowTemplate" type="text/x-kendo-tmpl">
<tr class='k-alt'>
<td>
${ FirstName } ${ LastName }
</td>
</tr>
</script>
rowTemplate
의
rowTemplate: kendo.template($("#rowTemplate").html().replace('k-alt', '')),
HTML 원인 내 KendoGrid
$("#Grid").kendoGrid({
scrollable: false,
sortable: true,
pageable: {
refresh: true,
pageSizes: true
},
dataSource: {
transport: {
read: {
url: '/Info/InfoList?search=' + search,
dataType: "json",
type: "POST"
}
},
pageSize: 10
},
rowTemplate: kendo.template($("#rowTemplate").html().replace('k-alt', '')),
altRowTemplate: kendo.template($("#rowTemplate").html())
});
라인에 내 코드입니다
Uncaught TypeError: Cannot read property 'replace' of undefined
이 오류를 해결할 수있는 방법입니다
고마워요. :)
내가 볼 수있는 유일한 이유는 jQuery를이 rowTemplate' ... 것은 당신이를 기록 할 수 있습니다 'id를 가진 요소를 찾을 수 없습니다 것입니다 '$ ("# rowTemplate"). length.의 값 반환 됨 반환되는 내용보기 –
@ArunPJohny 0을 반환합니다. 이유는 ... –
입니다. ID가 'rowTemplate' 인 요소가 없습니다. –