What is the limit of records we can deal with? - Page 4

What is the limit of records we can deal with?

124»

Answers

  • redaniredani Posts: 70Questions: 1Answers: 0
    edited January 2015

    euuh, don't know what is Editor PHP libraries, so i don't think i'm using it!!
    Before I make any changes, i'm thinking if I should display all list of orders or only from the last X months for example!!
    I don't think it's a good practice to load ALL orders, it will just saturate the server :/

    and will the pluck() function work well with server side?

  • redaniredani Posts: 70Questions: 1Answers: 0

    Hi Allan, how are you?

    I'd like to ask you 2 questions please:
    1- as I'm using deferRender, I'm currently querying the database in the main page to get the number of results. But I know i can do it differently by using "footerCallback":

    "footerCallback": function(row, data, start, end, display) { var api = this.api(); if(api.column(1).data().length) { // wait until datatables renders var num_rows = api.page.info().recordsDisplay; $("h1 span.num").html(num_rows); } }
    is that the best way to do so?

    2- I'd like to use the toggle column function, i found this link: https://datatables.net/examples/api/show_hide.html
    I was wondering if the column index must be indexed with numbers: data-column="0" or if I can use class names for example!

    Thanks a lot for your help

    Reda

  • allanallan Posts: 61,853Questions: 1Answers: 10,134 Site admin

    1) Using page.info() to get the number of records looks fine to me.

    2) Have a look at ColVis.

    Allan

  • redaniredani Posts: 70Questions: 1Answers: 0

    Wow, thanks for the very fast reply, i'm always impressed :)
    OK, I had a look at ColVis, it looks great!
    Is it possible to hide by default some columns?

  • redaniredani Posts: 70Questions: 1Answers: 0
    edited April 2015

    I found that i should use bVisible, but all the forums are from 2013 or earlier, is it still up to date?

    thanks

  • allanallan Posts: 61,853Questions: 1Answers: 10,134 Site admin

    Use columns.visible.

    The searchable reference for all options and the API is here.

    Allan

  • redaniredani Posts: 70Questions: 1Answers: 0

    OK, Thanks a lot.

  • redaniredani Posts: 70Questions: 1Answers: 0
    edited December 2015

    Hi Alan, hope you're doing well.

    I have one other little issue, I'm using deferRender, and when no results are found to display, the browser returns the following error: Uncaught TypeError: Cannot read property 'length' of undefined
    However when I already have results and search for something that doesnt exists, it says "No matching records found". So the problem is only for the initial display when there is nothing to display!

    Do you know how I can fix this?

  • allanallan Posts: 61,853Questions: 1Answers: 10,134 Site admin

    Please link to a test case showing the issue so I can debug it.

    Allan

  • redaniredani Posts: 70Questions: 1Answers: 0

    the links are in an admin page :/ can you please send me you email and i'll email you a test page?

  • allanallan Posts: 61,853Questions: 1Answers: 10,134 Site admin

    You can PM me by clicking my name above and then the "Send message" button.

    Allan

  • redaniredani Posts: 70Questions: 1Answers: 0

    done!

  • redaniredani Posts: 70Questions: 1Answers: 0

    Hi,
    I'll have one other request please.
    I'd like to be able to expand the rows. i saw this https://datatables.net/examples/api/row_details.html but it's not really what I want!

    I would like to be able to search even in the expanded data. Is that possible?
    and will it be also possible to do it using deferred data?

    thanks

  • allanallan Posts: 61,853Questions: 1Answers: 10,134 Site admin

    I would like to be able to search even in the expanded data. Is that possible?

    No. The DataTables search uses the column data only. You would need to include the data you want to search in a column (it could be hidden if you don't want it to be visible).

    Allan

  • redaniredani Posts: 70Questions: 1Answers: 0

    OK, i'll do that ;)
    Thanks again and happy holidays ;)

This discussion has been closed.