I am working on the task of transferring a dataset from Telerik RadGrid to a Kendo grid that is trying to set up sorting. I got a sorting that works fine for most of all columns, however some columns have "ambiguous" (same names) data field names. RadGrid takes this into account, allowing me to set "UniqueName" to indicate 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?
source share