• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • API Docs
    • Environments
    • Tutorials
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • Shifter »
    • Yogi »
    • YUI 2
    • YUI Doc »
    • YUI Test
    • YUI Website
    • YUI Compressor »
    • YUI Builder »
    • YUI PHP Loader
    • Grid Builder »
    • Skin Builder »
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • Yogi Documentation
  • Shifter Documentation
  • Developer Guide
  • Module Setup

Tag Cloud

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    Simple Datatable Filter Plugin (gallery-plugin-simple-datatable-filter) on cdn

    Last Updated: 10/16/12
    + 0 -

    Anthony Pipkin

    YUI Developer

    See 28 more by this user.

    Created: 12/4/10
    Last CDN Push: 12/10/10
    Build Tag: gallery-2010.12.10-17-31
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.7.3
    Free for use.

     
    Moving to 'gallery-xarno-plugin-datatable-filter' and Y.Xarno.Plugin.DTFilter

    Built to add functionality to [http://yuilibrary.com/gallery/show/simple-datatable Simple Data Table].

    Plugin allows filtering of Simple Datatable by targeted columns, all columns, or row ids.

    Method


    • recache - Updates the working cache to the host cache
    • search - Returns an array of rows to be added to the datatable. Accepts String and RegExp and will use the proper search method for such.
    • multiSearch - Will search the working cache on each key:value pair. Searching once on the first set, then on the subsequent passes, will search in the returned value set. Sets column to the current column being searched.
    • searchByRegExp - Will match column values in the working cache to the RegExp. If the column ATTRS is set, will only search on that column, otherwise, it will search all columns.
    • searchByString - Will match column values in the working cache to the String. If the column ATTRS is set, will only search on that column, otherwise, it will search all columns.
    • filterOn - Adds the column to the _searchColumns object. If it is a new column, it will search on the current working cache. If it is a column already in use, it will recache and loop through each column. Sets column to the current column being searched.
    • filter - If the value passed is a String or RegExp, the working cache will be searched, and the result set will be used. If the valued passed is an array, or when a working set is returned from the search, the value is then passed to the _updateHost method and then updates the datatable.

    Hooks


    • setRows - Hooks into the before host method of setRows() and updates the host cache to the value passed into
    • rowsChange - Hooks into the after host event of rowsChange and updates the host cache to the new value

    Configuration


    • column - Current singular column to search on
    • filterBy - Value of most recent filter when using the filter() method
    • refilterOnUpdate - If set to true, when the hooks are triggered, will refilter the new datatable rows
    • strict - If set to true, when performing String searches, will match for case. Otherwise, all strings will be converted to lower case and will the compared.
    • Tags:
    • filter
    • datatable
    • apipkin
    • plugin
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Code Sample

    <script src="http://yui.yahooapis.com/3.7.3/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2010.12.10-17-31'
    }).use('gallery-simple-datatable', 'gallery-plugin-simple-datatable-filter', function(Y) {
     
        var grid = new Y.SimpleDatatable();
        grid.set('headers',{id:{label:'Id', resizable:false}, title:'Title'});
        grid.set('rows',[
            {id:1,title:'Banana',__fileId:9},
            {id:2,title:'Orange'},
            {id:3,title:'Cherry'},
            {id:4,title:'Grape Fruit'},
            {id:5,title:'Watermelon'}
        ]);
     
        grid.render('#grid');
     
     
        grid.plug(Y.Plugin.SDTFilter);
     
        grid.filter.filter('Orange');
    });

    Forum Posts

    Subject Author Date
    Trying to experiment with this and can't get it to work Huey Brantley 07/13/10
    Re: Trying to experiment with this and can't get it to work Huey Brantley 07/14/10
    Example's style sheet missing Huey Brantley 07/14/10
    Modified Variant of simple-datatable Huey Brantley 07/16/10
    Re: Modified Variant of simple-datatable Anthony Pipkin 07/16/10
    Re: Modified Variant of simple-datatable Huey Brantley 07/16/10
    Re: Modified Variant of simple-datatable Anthony Pipkin 07/16/10
    Purpose of _defSelectedFn method? Huey Brantley 07/23/10
    Re: Purpose of _defSelectedFn method? Anthony Pipkin 07/25/10
    Version 1.2.0 Anthony Pipkin 08/11/10

    © 2006-2013 Yahoo! Inc. All rights reserved.
    All code on this site is licensed under the BSD License unless stated otherwise.
    About This Site · Security Contact Info