This is a migrated thread and some comments may be shown as answers.

New Filter Row formatting

4 Answers 315 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 2
Bill asked on 02 Aug 2014, 12:00 AM
I've implemented the new filter row, quite nice by the way, but I'm having some difficulty formatting a number type column.

There are 2 things I'd like to do:
1. Format the number with no decimal places like, format: "{0:n0}". This works for the data but not the filter row. After I tab off it adds a decimal and 2 trailing 0's
2. Remove the spinners in the number type column filters.

I've tried something like  below but I can't get it to work.

          filterable: {
                                   cell: {
                                       format: "{0:n0}",
                                       template: noSpinner
                                   }
                               }   
...
function noSpinner() {
     var g = $("#grid").data("kendoGrid");
     var fRow = g.thead.find("tr[class=k-filter-row]")
     // i dont know what to do here to remove the spinners
}







4 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Popov
Telerik team
answered on 05 Aug 2014, 12:50 PM
Hello Bill,

This could be achieved by using a filterable cell template, as shown in this example.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Bill
Top achievements
Rank 2
answered on 05 Aug 2014, 06:49 PM
Excellent, works like a charm.  Thank you.
0
Jason
Top achievements
Rank 1
answered on 16 Sep 2014, 12:47 AM
Hi there, in your example (2014.2.716), it works perfectly. 
However, I came across an issue with the latest release of KendoUI 2014.2.903, as show in this example.

The only change I made is listed below:
<script src="http://cdn.kendostatic.com/2014.2.716/js/kendo.all.min.js"></script>
<script src="http://cdn.kendostatic.com/2014.2.903/js/kendo.all.min.js"></script>

Wonder if this is a bug or is there any API changes?












0
Alexander Popov
Telerik team
answered on 17 Sep 2014, 12:44 PM
Hello Jason,

Yes, there are changes in the API. Please, check this thread for additional details.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Bill
Top achievements
Rank 2
Answers by
Alexander Popov
Telerik team
Bill
Top achievements
Rank 2
Jason
Top achievements
Rank 1
Share this question
or