Name of Lenght Function.

Name of Lenght Function.

ajinkya_aherajinkya_aher Posts: 8Questions: 0Answers: 0
edited November 2013 in Plug-ins
I want the name of function which is used in selected index change event of length dropdown as I want to add this function in my custom dropdown created by me. Can u provide me the same I had googled it but was enable to find any such function.

Replies

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Do you mean aLengthMenu?
    http://datatables.net/examples/advanced_init/length_menu.html
  • ajinkya_aherajinkya_aher Posts: 8Questions: 0Answers: 0
    Thanks for the prompt reply,

    but I want to use function to use for my custom created dropdown and by hidding the datatable length dropdown. eg I created custom text box for search and hided the original search box of datatable and gave the function named "fnFilter" to my custom textbox and now my textbox works for datatable now I want to add lenght function to my custom dropdown and not the dropdown of datatable. Below is the example of search box I created.


    This is for Search box.

    HTML:


    JQuery:
    $('#txtSearch').keypress(function () {
    oTable.fnFilter($(this).val());
    });


    As per above example I want to create length dropdown.
  • allanallan Posts: 63,678Questions: 1Answers: 10,497 Site admin
    Sounds like the fnLengthChange plug-in is what you want: http://datatables.net/plug-ins/api#fnLengthChange .

    1.10 will have a built in function that provides that functionality ( `page.len()` ).

    Allan
  • ajinkya_aherajinkya_aher Posts: 8Questions: 0Answers: 0
    Thank you.............:)
  • asifhussainasifhussain Posts: 7Questions: 0Answers: 0
    Hi Allan,
    In my jsp, i have disabled pagination using
    "bLengthChange": false,
    "bPaginate": false,
    when i add records using fnAddData(), it only shows 10 records.
    Also, when i use fnLengthChange() whenever i add a new row, it throws "object doesnt support this property or method".
    Please help!
This discussion has been closed.