Showing 1 to NaN of NaN entries (filtered from NaN total entries) error

Showing 1 to NaN of NaN entries (filtered from NaN total entries) error

SwethaReddySwethaReddy Posts: 7Questions: 0Answers: 0
edited July 2013 in DataTables 1.9
Hi Allan,

I am new to the community. New to Jquery as well. I have been working on JQuery since last 2 months and since then I have been using Datatables. This is an awesome plugin, works great. But I have one issue, my application has currently 218 rows and the number keeps increasing daily. Currently on IE8 it takes about 35 secs to load all the rows, hence I set bServerSide to true which resulted in displaying all the data in a single page and displays Showing 1 to NaN of NaN entries (filtered from NaN total entries). I tried all the solutions mentioned in this forum but none worked. I greatly appreciate your help in this regard. Thanks a lot in advance

Replies

  • SwethaReddySwethaReddy Posts: 7Questions: 0Answers: 0
    Appreciate if anybody can help me out in fixing the above problem.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Link to a test case showing the problem please: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read
  • SwethaReddySwethaReddy Posts: 7Questions: 0Answers: 0
    Please find the testcase below:
    http://live.datatables.net/idinat/52/edit

    I am probably missing something as information is not being rendered. Greatly appreciate your help.
  • SwethaReddySwethaReddy Posts: 7Questions: 0Answers: 0
    http://live.datatables.net/idinat/53/edit this is the edited version
  • SwethaReddySwethaReddy Posts: 7Questions: 0Answers: 0
    http://live.datatables.net/idinat/66/edit#source . Hi, Sorry for so many revisions. This is the final version.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Excellent - thank you for the test case.

    When I click the 'render' button it appears to work as expected. What do I need to do to trigger the error you are seeing?

    Allan
  • SwethaReddySwethaReddy Posts: 7Questions: 0Answers: 0
    Allan,

    My code is exactly what i have in the testcase but I am unable to reproduce it somehow :(. I figured that my C# code returns only aaData as response and it returns all the rows existing in the database. I am looking for a way on how to send iDisplayStart, iDisplayLength as parameters and how to use these in my SQL query to get sEcho, iTotalrecords and iTotalDisplayRecords as response. Do you think this will work? I think the best approach will be getting only the number of rows as per iDisplaylength, but i am not sure how to pass this as a parameter and use it in a SQl query.Btw, mine is a Asp.Net MVC application.
  • SwethaReddySwethaReddy Posts: 7Questions: 0Answers: 0
    Allan,

    I just found that main issue comes from my C# code. Currently as I am not passing sEcho,iDisplayLength and iDisplayStart as parameters my SQL query returns all rows from the table and parses these entities into JSON (Which is taking long time). If I can send sEcho,iDisplayLength and iDisplayStart as parameters to my SQL query i think that shd fix it . I am not sure though.
This discussion has been closed.