Change sLengthMenu from dropdown to somethign else

Change sLengthMenu from dropdown to somethign else

josecvegajosecvega Posts: 1Questions: 0Answers: 0
edited May 2013 in DataTables 1.9
Instead of having a drop-down for the sLengthMenu I would like to have a series of tags, like the following:

[code]
"sLengthMenu" : '25' +
'50'+
'100'
[/code]

The question is, how do I tie that to use the already dataTable feature like the drop-down already uses. Ideally I would like the user to click 100 and act is if the user had click the 100 from the drop-down.

Replies

  • pasumarthivijaykumarpasumarthivijaykumar Posts: 3Questions: 0Answers: 0
    what exactly that you want to happen..?

    [quote] "aLengthMenu": [[5, 10, 25, 50, -1], [5, 10, 25, 50, "All"]] [/quote]
    and the way that you are using. When the user selects the option the action will performed.

    f you bind bind any action any action to the dropdown

    [code] $('#table_length').unbind('change').bind('change', function(e){
    //you can do the things have to happen
    });
    [/code]

    Check the datatable.js file(lib/basic file) for more info.
This discussion has been closed.