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

Filter value formatting issue

4 Answers 219 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Joel asked on 27 Jun 2012, 02:57 PM
If a column within the Kendo UI MVC Grid is bound to an integer data type the filter value is formatted as #,###.##.  The expected behavior in this case would be to display the value to filter against as a whole number with no formatting.

4 Answers, 1 is accepted

Sort by
0
Doogle
Top achievements
Rank 1
answered on 03 Oct 2012, 04:15 PM
My users have entered a bug against our software due to this issue.

Help please!
0
Jodi
Top achievements
Rank 1
answered on 16 Nov 2012, 10:38 PM
Is there any update on this?  I'm running into it as a problem as well.

Thanks,
Jodi
0
Jodee
Top achievements
Rank 1
answered on 09 Apr 2013, 09:53 PM
I'd like to see the answer to this issue as well!
0
Jodee
Top achievements
Rank 1
answered on 10 Apr 2013, 07:25 PM
Got a response from support that this can be accomplished with the code below. I also added decimals:0 after the format option

 $("#grid").kendoGrid({
     dataSource: dataSource,
     navigatable: true,
     filterable: true,
     pageable: true,
     height: 430,
     toolbar: ["create", "save", "cancel"],
     columns: [
             "ProductName",
       {
             field: "SomeIntegerBoundField",
             title: "SomeIntegerBoundField",
             width: 110
         }, {
             command: "destroy",
             title: " ",
             width: 90
         }
     ],
     editable: true,
     filterMenuInit: filterNumericFormat
 });

 function filterNumericFormat() {

     filterMenu = $("#grid thead th[data-field = SomeIntegerBoundField]").data("kendoFilterMenu");
     $(filterMenu.form).find("[data-role = numerictextbox]").each(function () {
         $(this).data("kendoNumericTextBox").setOptions({
             format: "n0"
         });
     });
 }
Tags
Grid
Asked by
Joel
Top achievements
Rank 1
Answers by
Doogle
Top achievements
Rank 1
Jodi
Top achievements
Rank 1
Jodee
Top achievements
Rank 1
Share this question
or