This question is locked. New answers and comments are not allowed.
Hi Experts,
I am using Telerik Web MVC (Version : 2012.1.214.340). on my view file I have Telerik grid which is bound using ajax and on this grid I have a template column and all works fine except the sorting does not work.
The above template column "size" is sum of the contentLength on the files table for each client.
The sort works fine on other column except the template column added.
Any help will be highly appreciated.
I am using Telerik Web MVC (Version : 2012.1.214.340). on my view file I have Telerik grid which is bound using ajax and on this grid I have a template column and all works fine except the sorting does not work.
@(Html.Telerik().Grid(Model) .Name("ClientsGrid") .DataKeys(keys => keys.Add(s => s.Id)) .DataBinding(binding => binding.Ajax() .Select("GetClientWithStorage", "ClientsGrid", new { filter = "" }) ).Columns(columns => { columns.Bound(o => o.Reference).Title("Client ID").Width(100); columns.Bound(o => o.Name).Title("Client Name").Width(300); columns.Template(@<text> @if (item.Files != null) { @Math.Round((decimal)(item.Files.Sum(m => m.ContentLength)) / 1024)@(" KB") } </text>) .Title("Size") .ClientTemplate("<#=GetClientTotalSize(Files)#>").Width(100);}).Selectable().Sortable(sort => sort.OrderBy( config => config.Add(x => x.Reference) )).Filterable().Pageable(p => p.PageSize(14).Enabled(true)).ClientEvents(x =>{ x.OnRowSelected("clientGrid.rowSelected"); x.OnLoad("clientGrid.onDataBound"); x.OnDataBound("clientGrid.onDataBound"); x.OnDataBinding("clientGrid.onDataBinding");}).Footer(true)The above template column "size" is sum of the contentLength on the files table for each client.
The sort works fine on other column except the template column added.
Any help will be highly appreciated.