Pagination doesn't work AT ALL!!!!!

Pagination doesn't work AT ALL!!!!!

pborreggpborregg Posts: 59Questions: 2Answers: 0
edited December 2013 in Plug-ins
Hello, I'm using FLATTY (Bootstrap) template and dataTables for the data we're retrieving from Postgres through JAVA into JSON and using Handlebars.js to render... yeah, I know... I just work here. Ideally, I'd write a stored procedure to give me the data to send back what I need. But NO, they need all these multiple layers. Suffice it to say, I'm STRUGGLING with the pagination. I have a drop down showing 5, 15 and 25... I have the message stating: Showing of 3 rows. That's it...

I don't believe your documentation is intuitive, easy or clear.

What I need is real help. I need an example with 10 rows of fake data, 9 columns, the first being a CHECKBOX but via a glyph not a REAL checkbox... everything else in the table is TEXT.

The column header sort doesn't work, AT ALL.

This is probably because of the garbage code I'm dealing with.

Here's my code... very basic

[code]
<!-- start of data table wrapper -->







<!-- Datatable Top Row -->



Show

5
10
25
entries



<!-- Sort Filter Clear -->

<!-- Comment -->



Sort



Filter

-->



<!-- End Sort Filter Clear -->
<!-- Start of Handlebars TABLE... THIS IS WHERE the Datatable is rendered -->

<!-- END of Handlebars TABLE... This is where the Datatable ends -->

Showing of total rows.








<!-- END TABLE wrapper -->
[/code]

CAN ANYONE PLEASE HELP ME here....

Love the Datatables but the documentation is useless. Not intuitive, not easy and not time-saving.

Regards,

Peter

Replies

  • allanallan Posts: 57,686Questions: 1Answers: 9,195 Site admin
    Can you please link to a test case, showing the issue, so we can debug it and offer some help. See: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read .

    > Love the Datatables but the documentation is useless. Not intuitive, not easy and not time-saving.

    I'm working on improvement the documentation.

    Allan
  • pborreggpborregg Posts: 59Questions: 2Answers: 0
    It's kind of hard since the company I work for has proprietary code... I'll need to strip out the details... Where do you want me to post the test case? JS Fiddle???

    Thanks, or do you have a private server where I can post the code...
  • allanallan Posts: 57,686Questions: 1Answers: 9,195 Site admin
    JS Fiddle or live.datatables.net . PM me the address if you like and I can delete it after we've taken a look.

    The debugger might also give us a clue as to why it isn't working: http://debug.datatables.net .

    Allan
  • pborreggpborregg Posts: 59Questions: 2Answers: 0
    Alan,

    here's the table debug link

    http://debug.datatables.net/izeron

    Working on live.datatable.net.... if I save will it be publicly viewable???

    Peter
  • allanallan Posts: 57,686Questions: 1Answers: 9,195 Site admin
    Yes it will be. If you click my forum user name above and then "Send message" you'll be able to PM me the url and we'll get it private.

    Thanks for the debug trace - unfortunately it doesn't show anything as the Javascript error is occurring before the table is initialised, so there is no information for it to report :-(

    Allan
  • pborreggpborregg Posts: 59Questions: 2Answers: 0
    Allan, here's the good news!! I GOT IT... you won't believe what it was. There were two Document ready functions and the one for the dataTable was NEVER being fired. So, after the table was rendered I placed the table initialization code... POOF!!!!!!!!!!!!

    OMG it works!

    Now a few glitches.... minor....

    Here's my debug code: http://debug.datatables.net/aqonik

    Secondly, the showing pages of... is 10, 25, 50 and 100, but it's initially showing 182 rows. The problem I'm getting is that I have an accordion table so every other row is the detail and it's giving me the error that's: Requested Unknown parameter 1 for data source for row 1. Rows 1, 3, 5, etc... to n... are DETAILS and toggle as HIDDEN and are not rows... but the accordion.

    Third, the pagination is partially working. The PREVIOUS and NEXT are all that show but since I start out with some rows hidden, the datatables doesn't get it. The user can toggle CRITICAL ROWS, WARNING ROWS, and OKAY ROWS (which by default are hidden).

    So, whew, this has been a long journey but it's finally making sense.

    Thoughts?

    Thanks,

    PEter
  • pborreggpborregg Posts: 59Questions: 2Answers: 0
    Allan, Happy New Year my friend.

    Now back to business. I have the pages showing exactly as I request. 10, 15, 25, 50. That item is closed.

    OK, only problem left is the message about this:

    Requested unknown parameter 1 for the data source for row 1; and for parameter, 2, 3, 4....8 for all the columns I have which is 9.

    Also, when I click on the column header to sort, the rows disappear, but when I click on them again, they come back. Weird thing is, when I show, "ALL", the rows sort nicely and don't disappear. This only occurs when the rows are set to a specific number displayed like 10, 25, 50, 100, etc....

    When I add mData, the problem goes away, but the datatables "ADDS" column one's data arbitrarily to each other column.... weird.

    I'm sending you the link for the debug privately... I have no choice. It's got REAL DATA.

    Thanks, for your help.

    Regards,

    Peter
  • allanallan Posts: 57,686Questions: 1Answers: 9,195 Site admin
    Hi Peter,

    Think we might be duplicating the conversation here: http://datatables.net/forums/discussion/18916/new-table-is-being-created-when-i-try-to-reload-the-existing-table

    Allan
  • pborreggpborregg Posts: 59Questions: 2Answers: 0
    You're right, I've written a new update in that other discussion.

    I"m nearly there.... check it out.
This discussion has been closed.