Filter value formatting issue

5 posts, 0 answers
  1. Joel
    Joel avatar
    78 posts
    Member since:
    Oct 2012

    Posted 27 Jun 2012 Link to this post

    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.
  2. Doogle
    Doogle avatar
    9 posts
    Member since:
    Oct 2012

    Posted 03 Oct 2012 Link to this post

    My users have entered a bug against our software due to this issue.

    Help please!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Jodi
    Jodi avatar
    3 posts
    Member since:
    Sep 2012

    Posted 16 Nov 2012 Link to this post

    Is there any update on this?  I'm running into it as a problem as well.

    Thanks,
    Jodi
  5. Jodee
    Jodee avatar
    2 posts
    Member since:
    Nov 2012

    Posted 09 Apr 2013 Link to this post

    I'd like to see the answer to this issue as well!
  6. Jodee
    Jodee avatar
    2 posts
    Member since:
    Nov 2012

    Posted 10 Apr 2013 Link to this post

    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"
             });
         });
     }
Back to Top
UI for ASP.NET MVC is VS 2017 Ready