Results 1 to 3 of 3

Thread: (Solved) Grid filtering beginner issue

  1. #1

    Default (Solved) Grid filtering beginner issue

    Hallo together,

    sorry probably I'm having a realy beginning question, but I'm new in ExtJs.

    I need a filterable/sortable grid. So I started with the examples and finished very fast my first grid. (Only sortable).
    I've tried to keep everying stupid easy. Now I'm having issues by adding the filtering part to my existing grid.

    The filter is now visible in the headline, but when I write anything into the box, I only get an "this.proxy is undefined errror".
    (Additional question: Is it right to use the filter extension out of the examples/ux folder ?)

    Here is my easy keept code: (Thank you in advange)
    Code:
    <html>
    <head>
         <title></title>
         <link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css">
         <script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
         <script type="text/javascript" src="ext/ext-all-debug.js"></script>
         
         <!-- Grid Filter -->
        <script type="text/javascript" src="ext/examples/ux/gridfilters/GridFilters.js"></script>
        <script type="text/javascript" src="ext/examples/ux/gridfilters/filter/Filter.js"></script>
        <script type="text/javascript" src="ext/examples/ux/gridfilters/filter/StringFilter.js"></script>
         <!-- Grid Filter End-->
         
         <script type="text/javascript">
    
              Ext.onReady(function(){
              
                   var rawdata = [
                        ['One','1'],
                        ['One One','1'],
                        ['Two','2']
                   ];
                   
                   var datastore = new Ext.data.ArrayStore({
                        fields: [
                             {name: 'appl'},
                             {name: 'farm'}
                        ]
                   });
    
                   datastore.loadData(rawdata);   
                   
                   var filters = new Ext.ux.grid.GridFilters({
                        filters: [{
                             type: 'string',
                             dataIndex: 'appl'
                        }]
                   });  
    
                   var grid = new Ext.grid.GridPanel({
                        store: datastore,
                        columns: [
                             {id:'appl', header:'Application Name', dataIndex:'appl', sortable:true},
                             {header:'Citrix Farm', dataIndex:'farm', sortable:true}
                        ],
                        renderTo: 'grid',
                        autoExpandColumn: 'appl',
                        width: 600,                    
                        height: 400,
                        title: 'Applications',
                        plugins: [filters]
                   });
             
              });
    
         </script>
         <style>
              body { padding: 10px; }
         </style>
    </head>
    <body>
         <div id="grid" name="grid"></div>
    </body>
    </html>

  2. #2
    Ext JS Premium Member prakashpaudel's Avatar
    Join Date
    May 2009
    Location
    Kathmandu, Nepal
    Posts
    78

    Default

    You are using the ArrayStore so I assume you are trying to filter the grid data locally. May be the default GridFilters filter mode is
    Code:
    local: false
    The local:false mode try to reload the store with it's proxy.
    Try this for local filtering
    Code:
    var filters = new Ext.ux.grid.GridFilters({
                        filters: [{
                             type: 'string',
                             dataIndex: 'appl'
                        }],
                        local:true
    });

  3. #3

    Default

    Worked. Thank you very much.

Similar Threads

  1. beginner try to save content of a editable grid
    By chevaje in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 25 Jan 2010, 2:34 PM
  2. Newbie in need: Issue with grid filtering...
    By sk8boip in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 23 Jul 2009, 12:42 PM
  3. Grid Filtering Issue!!!
    By sk8boip in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 11 Jun 2009, 12:21 AM
  4. Grid with Checkbox [Beginner]
    By agon84 in forum Ext GWT: Help & Discussion (1.x)
    Replies: 1
    Last Post: 30 Dec 2008, 7:58 AM
  5. EXT JS beginner - absolute layout issue
    By deblasio in forum Ext 2.x: Help & Discussion
    Replies: 15
    Last Post: 3 Sep 2008, 11:48 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
  •