Results 1 to 2 of 2

Thread: How to create Grid Local filtering?

  1. #1

    Join Date
    Aug 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default How to create Grid Local filtering?

    I have an application with a Grid in it with lots of records. I just wanted to create a search box to filter the grid based on the search criteria. I have seen that there are some UX classes available for it. But I don't know how to integrate those classes in the app and make use of them. It would be more helpful if I have filtering like in the example given in the Sencha Examples.

    Thanks in Advance.



  2. #2
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Mlheim an der Ruhr, Germany
    Posts
    82
    Answers
    5
    Vote Rating
    0
      0  

    Default

    I tried it so:

    Code:
        // configure whether filter query is encoded or not (initially)
        var encode = false;
        // configure whether filtering is performed locally or remotely (initially)
        var local = true;
        var filters = {
            ftype: 'filters',
            // encode and local configuration options defined previously for easier reuse
            encode: encode, // json encode the filter query
            local: local,   // defaults to false (remote filtering)
            // Filters are most naturally placed in the column definition, but can also be
            // added here.
            filters: [
                {
                    type: 'boolean',
                    dataIndex: 'visible'
                }
            ]
        };
    and in the grid for example:
    Code:
    {header:"CM-Sachgebiet",dataIndex:"sachgebiet", hidden:true,
    filter: {
                    type: 'string'
             }},
              {text:"Casemanager",dataIndex:"cm", hidden:true,            
                        filter: {
                    type: 'string'
                    
                }},

Tags for this Thread

Posting Permissions

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