I am working with on a task to migrate a dataset from a Telerik RadGrid to a Kendo Grid trying to set up sorting. I got the sorting working fine for most all the columns, however some of the columns have 'ambiguous' (same named) data-field names. The RadGrid accounts for this by allowing me to establish a 'UniqueName' to specify which column.
Kendo Grid Example
var assignmentColumns =
[
{ title: "Last Note Date", field: "NoteDateTime", template: '#= kendo.toString( toDate(NoteDateTime), "M/dd/yyyy h:mmtt" ) #' }
];
var gridDataSource = new kendo.data.DataSource({
transport: {
read: {
url: '-',
type: 'POST',
contentType: 'application/json'
},
parameterMap: function (options) {
return JSON.stringify(options);
}
},
schema: {
data: 'data',
total: 'totalItems'
},
serverPaging: true,
pageSize: 10,
serverFiltering: true,
serverSorting: true
});
$grid.kendoGrid({
dataSource: gridDataSource,
pageable: true,
scrollable: false,
sortable: {
allowUnsort: true
},
columns: assignmentColumns
});
Telerik Working Example
<telerik:RadGrid ID="radGrid_Commentary" AllowSorting="true">
<MasterTableView>
<Columns>
<telerik:GridBoundColumn DataField="NoteDateTime" UniqueName="cg.Date" HeaderText="Date" DataFormatString="{0:MM/dd/yyyy}" />
</Columns>
</MasterTableView>
</telerik:RadGrid>
Does anyone have any ideas on how to specify a 'UniqueName' for the kendogrid column?