Page 102 of 104 FirstFirst ... 25292100101102103104 LastLast
Results 1,011 to 1,020 of 1037

Thread: Grid Search Plugin for Ext 4.x [updated]

  1. #1011
    Sencha User
    Join Date
    Sep 2011
    Posts
    27
    Vote Rating
    0
      0  

    Default

    @ivanleblanc
    Sorry, it was a stupid mistake. I put the feature config in custom grid's parent class.

    I should have updated my post, but I was caught up in super ultra urgent project back then. My sincere apologies for wasting your time.

    Thanks

  2. #1012
    Sencha User
    Join Date
    May 2008
    Posts
    45
    Vote Rating
    0
      0  

    Default Small improvement

    Code:
            Ext.each(columns, function(column) {
                var disable = false;
                if(column.text && column.dataIndex && column.dataIndex != '') {
                    Ext.each(this.disableIndexes, function(item) {
                        disable = disable ? disable : item === column.dataIndex;
                    });
                    if(!disable) {
                        if(typeof column.searchable != 'undefined' && column.searchable == false) {
                            disable = true;
                        }
                    }
                    if(!disable) {
                        menu.add({
                            xtype: 'menucheckitem',
                            text: column.text,
                            hideOnClick: false,
                            group:group,
                            checked: 'all' === this.checkIndexes,
                            dataIndex: column.dataIndex,
                        });
                    }
                }
            }, this);
    I added a functionality for a column based searchable configuration.

    This can be used like
    Code:
    this.columns = [{
        text:'ID',
        dataIndex:'id',
        width:50,
        searchable:false
    },{.....

  3. #1013
    Sencha User
    Join Date
    May 2008
    Posts
    45
    Vote Rating
    0
      0  

    Default Bugfix

    Bugfix for datecolumns with the format property like:

    Code:
    ,{
      text:'date',
       dataIndex:'datecreated',
       xtype:'datecolumn',
       format:'d.m.Y H:i'
    }
    Code:
     // grid's store filter
            if('local' === this.mode) {
                store.clearFilter();
                if(val) {
                    store.filterBy(function(r) {
                        var retval = false;
                        this.menu.items.each(function(item) {
                            if(!item.checked || retval) {
                                return;
                            }
                            var rv = r.get(item.dataIndex);
                            var cformat = this.grid.columns[Ext.Array.indexOf(Ext.Array.pluck(this.grid.columns, 'dataIndex'), item.dataIndex)].format;
                            
                            rv = rv instanceof Date ? Ext.Date.format(rv, this.dateFormat || cformat) : rv;
                            var re = new RegExp(val, 'gi');
                            retval = re.test(rv);
                        }, this);
                        if(retval) {
                            return true;
                        }
                        return retval;
                    }, this);
                }
                else {
                }
            }
    The error before was the follow 'format is null' because the format or dateFormat was null in the field (the error only occured in local mode):

    format_error.jpg

  4. #1014
    Sencha User
    Join Date
    Feb 2009
    Posts
    75
    Vote Rating
    -1
      0  

    Default Ivanblanc's 4.0 port

    Does Ivanblanc's 4.0 port work with 4.1? Or is there a 4.1 native alternative?
    This is such a great feature, I keep hoping they will make it part of the toolkit.

  5. #1015
    Sencha User
    Join Date
    Sep 2011
    Posts
    27
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by bareflix View Post
    Does Ivanblanc's 4.0 port work with 4.1? Or is there a 4.1 native alternative?
    This is such a great feature, I keep hoping they will make it part of the toolkit.
    Yes it is, I use it on my project with ExtJS 4.1

  6. #1016
    Sencha User
    Join Date
    Jul 2012
    Posts
    1
    Vote Rating
    0
      0  

    Default How it works..

    I can use this port to a grid with data from the server?


    Just get it to work with grid-array.

  7. #1017
    Sencha User
    Join Date
    Apr 2011
    Location
    Russia
    Posts
    72
    Vote Rating
    1
      0  

    Default

    Hi, guys. Who knows how to make this plugin work with a grid having grouped headers like header 1 -- header 1.1 header 1.2. Now it is possible to search over "simple" headers. Grouped headers are ignored.

    img.png
    Last edited by vicvolk; 21 Aug 2012 at 8:58 AM. Reason: add an image

  8. #1018
    Sencha User
    Join Date
    Apr 2011
    Location
    Russia
    Posts
    72
    Vote Rating
    1
      0  

    Default

    Quote Originally Posted by vicvolk View Post
    Hi, guys. Who knows how to make this plugin work with a grid having grouped headers like header 1 -- header 1.1 header 1.2. Now it is possible to search over "simple" headers. Grouped headers are ignored.

    img.png
    I made it work for me. Instead of

    PHP Code:
    Ext.each(columns, function(column) {
                var 
    disable false;
                if(
    column.text && column.dataIndex && column.dataIndex != '') {
                    
    Ext.each(this.disableIndexes, function(item) {
                        
    disable disable disable item === column.dataIndex;
                    });
                    if(!
    disable) {
                        
    menu.add({
                            
    xtype'menucheckitem',
                            
    textcolumn.text,
                            
    hideOnClickfalse,
                            
    group:group,
                            
    checked'all' === this.checkIndexes,
                            
    dataIndexcolumn.dataIndex,
                        });
                    }
                    
                }
            }, 
    this); 
    I simply wrote this piece of code

    PHP Code:
    var cls this.grid.headerCt.getGridColumns();
                                            
                var 
    0;
                                    
                while(
    cls.length){
                
                    
    //i == 0 is my first check column
                                    
                    
    if(this.grid.headerCt.getHeaderAtIndex(i) && != 0) {
                    
                        
    menu.add({
                            
    xtype'menucheckitem',
                            
    textthis.grid.headerCt.getHeaderAtIndex(i).text,
                            
    hideOnClickfalse,
                            
    group:group,
                            
    checked'all' === this.checkIndexes,
                            
    dataIndexthis.grid.headerCt.getHeaderAtIndex(i).dataIndex,
                        });                    
                                                                
                    }

                    
    i++;
                    
                } 
    Now it iterates trough all columns.

  9. #1019
    Sencha User
    Join Date
    Mar 2012
    Posts
    211
    Vote Rating
    0
      0  

    Default Problem with Extjs 4

    Hello

    I did as your instruction to plugin the grid search function, but it raise an error
    [COLOR=red !important]Uncaught TypeError: Object #<Object> has no method 'reg' Ext.ux.grid.RowActions.js:423[/COLOR]
    [COLOR=red !important]Uncaught TypeError: Object function (parentNode, containerIdx) {
    } has no method 'createSequence' Ext.ux.grid.Search.js:169

    What is the problem?

    Thank you



    [/COLOR]

  10. #1020
    Sencha User
    Join Date
    Aug 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default That was cool.

    Pls am new to Ext js. I will like to be directed on how to use it.

Page 102 of 104 FirstFirst ... 25292100101102103104 LastLast

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
  •