Hello.
I have such rowTemplate for output my data into the grid:
And I prepared another template if records is not found:
And I need to do some changes between this templates. I mean assign this "empty_row" to the grid when "no records found":
Need help.
Thanks.
I have such rowTemplate for output my data into the grid:
<
script
id
=
"row_template"
type
=
"text/x-kendo-tmpl"
>
<
tr
>
<
td
>
#= UserName #
</
td
>
<
td
>
#= FirstName #
</
td
>
<
td
>
#= LastName #
</
td
>
</
tr
>
</
script
>
And I prepared another template if records is not found:
<
script
id
=
"empty_row"
type
=
"text/x-kendo-tmpl"
>
<
tr
>
<
td
colspan
=
"7"
>No records found</
td
>
</
tr
>
</
script
>
And I need to do some changes between this templates. I mean assign this "empty_row" to the grid when "no records found":
$(
"table.kendo_grid"
).kendoGrid({
dataSource: {
transport: {
...
},
schema: {
...
},
change:
function
(data) {
if
(data.sender.total() == 0) {
// What I need to write here?
}
},
...
Need help.
Thanks.