Hello.
I have a project with kendo-kncokout plugin and real time data using signarR.
the data is pushed to the KO view model which is bonded to the grid and updates the data.
While sorting on regular grid the data is resorted on update, but when i try to do this on a templated row it doesn't work.
Is there a way to make the sorting work for a template row?
code :
<table id="grid" data-bind="kendoGrid: {
data: GridTable,
rowTemplate: 'rowTmpl',
useKOTemplates: true,
pageable: false,
sortable: true,
resizable: true,
reorderable: true,
columnMenu: true,
filterable: {extra: false, operators: {string: {eq: 'Full Name',startswith: 'Starts with', }, } },
columns: [
{field: 'CName()', title: 'CName'},
{field: 'WOName()', title: 'WOName'},
{field:'WOPercentProduced()',type: 'number', title: 'WOPercentProduced'},
{field: 'WODate()', type: 'date', title: 'WODate'} ],
dataSource: {data: GridTable ,schema: { model: { fields:
{
CName: { type: 'string'},
WOName: { type: 'string' },
WOPercentProduce: { type: 'number'},
WODate: { type: 'date' }
} }}} }">
<thead>
<tr>
<th data-field="CName">
CName
</th>
<th data-field="WOName">
WOName
</th>
<th data-field="WOPercentProduced">
WOPercentProduced
</th>
<th data-field="WODate">
WODate
</th>
</tr>
</thead>
</table>
tnx
Yaniv
I have a project with kendo-kncokout plugin and real time data using signarR.
the data is pushed to the KO view model which is bonded to the grid and updates the data.
While sorting on regular grid the data is resorted on update, but when i try to do this on a templated row it doesn't work.
I'm using a 'useKOTemplates: true' attribute for the template.
Is there a way to make the sorting work for a template row?
code :
<table id="grid" data-bind="kendoGrid: {
data: GridTable,
rowTemplate: 'rowTmpl',
useKOTemplates: true,
pageable: false,
sortable: true,
resizable: true,
reorderable: true,
columnMenu: true,
filterable: {extra: false, operators: {string: {eq: 'Full Name',startswith: 'Starts with', }, } },
columns: [
{field: 'CName()', title: 'CName'},
{field: 'WOName()', title: 'WOName'},
{field:'WOPercentProduced()',type: 'number', title: 'WOPercentProduced'},
{field: 'WODate()', type: 'date', title: 'WODate'} ],
dataSource: {data: GridTable ,schema: { model: { fields:
{
CName: { type: 'string'},
WOName: { type: 'string' },
WOPercentProduce: { type: 'number'},
WODate: { type: 'date' }
} }}} }">
<thead>
<tr>
<th data-field="CName">
CName
</th>
<th data-field="WOName">
WOName
</th>
<th data-field="WOPercentProduced">
WOPercentProduced
</th>
<th data-field="WODate">
WODate
</th>
</tr>
</thead>
</table>
tnx
Yaniv