Results 1 to 2 of 2

Thread: Grid Filter: Explicit Field Type Maybe Required

  1. #1
    Sencha Premium Member
    Join Date
    Aug 2013
    Chicago, IL

    Default Grid Filter: Explicit Field Type Maybe Required


    The grid filtering plugin, works great with string values. However, if you intend to use the numeric (or number) filter option, then a type property may need to be explicitly defined on the target field. I discovered this when trying to use the plugin with a grid populated with data having the format 0,000.00. The grid filter would not work unless I explicitly set the field type to float.

    Is this a bug or a feature?

    Requisite Fiddle:

  2. #2
    Sencha User
    Join Date
    Jun 2008


    That looks like a feature to me. AUTO type takes the value as is. Since youre passing strings through json you get strings in the record. I would recommend passing your data as the proper type and specifying the col as the proper type, then using a column renderer to format it properly.

    The number filter has no way of knowing how to properly cast the "numeric" string to a number since Number('1,000') = NaN in JS.

    I would never use the AUTO type unless you specifically want to treat the field as a blob of data.

Similar Threads

  1. Replies: 2
    Last Post: 29 Nov 2015, 5:26 PM
  2. [FIXED] Issue on Grid with list type filter
    By amit.chudasama in forum Ext 5: Bugs
    Replies: 3
    Last Post: 18 Mar 2015, 1:40 AM
  3. Replies: 2
    Last Post: 14 Mar 2012, 4:41 AM
  4. Explicit declaration of upload field
    By ivanblue in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 1 Jul 2009, 7:06 AM
  5. Auto-filter type list in a grid
    By bluaish in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 27 Feb 2009, 8:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts