Filtering with First Letter

Filtering with First Letter

SonicSonic Posts: 4Questions: 0Answers: 0
edited September 2011 in General
Is there any plugin that can build a english letter menu (ALL | A | B | C ... Z) so that i can filter the data that start with that character?
just like this jquery do: http://www.ihwy.com/labs/Demos/Current/jquery-listnav-plugin.aspx

I am new to datatables. Maybe this question is easy to solve... Thanks!

Replies

  • SonicSonic Posts: 4Questions: 0Answers: 0
    edited September 2011
    I already get it work...

    JS code
    [code]
    var oTable = $('#schoollist').dataTable( {
    "sDom": "frtip",
    "iDisplayLength": 10,
    "sPaginationType": "full_numbers",
    "bStateSave": true
    });

    function fil(rexp)
    {
    $('#schoollist').dataTable().fnFilter(rexp, 0, true, false);
    }
    [/code]

    HTML CODE to control A~Z
    [code]

    ALL |
    A |
    B |
    C |
    [/code]
  • SonicSonic Posts: 4Questions: 0Answers: 0
    edited September 2011
    The problem is, how can i load the "STATE" and ADD a class to "A~Z" link let user know it is selected?
  • SonicSonic Posts: 4Questions: 0Answers: 0
    None can help? :(
  • DukeAstarDukeAstar Posts: 11Questions: 0Answers: 0
    I've got the same need and so I wrote a plugin to integrate listnav to datatable

    you can find it on github

    http://github.com/DukeAstar/DT_ListNav
  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin
    Brilliant! I haven't come across ListNav before, but it looks great and your plug-in makes it wonderfully easy to integrate with DataTables. Thanks for sharing this with us :-). I've added your GitHub repo to the DataTables news feed (if you'd like the credit altered at all, just let me know).

    Regards,
    Allan
  • jcreadyjcready Posts: 44Questions: 0Answers: 0
    You are a gentleman and a scholar, DukeAstar. I will be using this.
  • DukeAstarDukeAstar Posts: 11Questions: 0Answers: 0
    Thanks for your comments, feedback are welcome.
    It's a first release which match my needs , but I'm gonna extend it to be more flexible.

    The listnav options are not accessible for now, but they will be available ASAP.
  • DukeAstarDukeAstar Posts: 11Questions: 0Answers: 0
    @allan : thks for the news feed
This discussion has been closed.