Suppose I have
and data
What I would like is to set a row to display in italics when the row that has a nodeid value different than that of the button. I do not want to show the nodeid in the grid.
I've tried templating the row with no success
var window.btnid = $("#btn").data('nodeid');
...
kendoGrid({
...
rowTemplate: '<tr #if (nodeid != ' ' && nodeid != window.btnid) { class=italic }#><td>${one}</td><td>${two}</td> .... ';
<button id=
'btn'
class=
'k-button'
data-nodeid=
'111'
>XYZ</button>
<div id=
'grid1'
></div>
and data
var
rows = [
{
"one"
:
"1"
,
"two"
:
"21"
,
"three"
:
"31"
,
"nodeid"
:
' '
}
, {
"one"
:
"2"
,
"two"
:
"22"
,
"three"
:
"32"
,
"nodeid"
:
' '
}
, {
"one"
:
"3"
,
"two"
:
"23"
,
"three"
:
"33"
,
"nodeid"
:
'123'
}
, {
"one"
:
"4"
,
"two"
:
"24"
,
"three"
:
"34"
,
"nodeid"
:
' '
}
];
var
btnNodeid = $(
'#btn'
).data(
'nodeid'
);
$(
'#grid1'
).kendoGrid({
dataSource: rows
)}
What I would like is to set a row to display in italics when the row that has a nodeid value different than that of the button. I do not want to show the nodeid in the grid.
I've tried templating the row with no success
var window.btnid = $("#btn").data('nodeid');
...
kendoGrid({
...
rowTemplate: '<tr #if (nodeid != ' ' && nodeid != window.btnid) { class=italic }#><td>${one}</td><td>${two}</td> .... ';