jQuery UI Widgets Forums DataTable Changing Number of Total Virtual Records

This topic contains 5 replies, has 2 voices, and was last updated by  apelton 9 years, 2 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Changing Number of Total Virtual Records #77416

    apelton
    Participant

    Hi,

    I’m basing an example off of the demo at: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxdatatable/index.htm#demos/jqxdatatable/javascript-datatable-rows-rendering.htm

    I have additionally removed the line drawing between rows, so that it appears as 6 individual items on the page. In your example, the pager details in the bottom right corner says showing “1-2 of 6”. I would like it to say “1-6 of 18″… basically derive the number from multiplying rows times number of virtual items in the row instead of using just the number of rows.

    I realize there is a pagerRenderer, but I would prefer not to re-write all of the code for the standard page renderer that does the buttons etc. Is there a function I can override, or provide to the data table to use the result of that function to display total items that are virtually on a page as well as total virtual items overall?


    Thanks!

    Changing Number of Total Virtual Records #77434

    Hristo
    Participant

    Hello apelton,

    You can use that pageSize: 6, property in jqxDataTable.
    With this You can control number of rows in table.
    PS: About last part of sentence ‘1-6 of 18‘ matter of quantity from elements.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Changing Number of Total Virtual Records #77457

    apelton
    Participant

    Hi Hristo,

    Unfortunately changing that property doesn’t appear to help me. I actually have already set that value to 6 to display 6 rows. I have one actual column in my table that displays 4 html panels/items from my attached data source to effectively give the Tile Grid layout. Changing the pageSize to something else would increase the rows, but I still have 4 html items in each row, so I need the summary to show ‘1-24 of x’. However the summary is only aware of the table having one data column so it displays ‘1-6 of x’.

    I’m not quite clear on your PS comment with regard to matter of quantity from elements?

    Changing Number of Total Virtual Records #77465

    apelton
    Participant

    Hi again,

    I think I understand what you were trying to say and I apologize if I confused you. Regardless of how many rows page size is, whether it be 2 or 6…. let’s say it’s 6, in the example, there are still 3 virtual columns in each row of laptops and thus instead of the page summary saying 1-6, I want it to say showing 1-(6×3) or 1-18. In the laptop example, each row&column combination is a record visually in the display. Visually, rows aren not records themselves (although in the data source they are). Therefore, the summary should not use the page size attribute because each row has multiple records.

    Changing Number of Total Virtual Records #77476

    Hristo
    Participant

    Hello apelton,

    Sorry if I confused You. Property pagerRenderer is the only way to settle this issue.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    Changing Number of Total Virtual Records #77533

    apelton
    Participant

    OK. I will do that for now. It might be an idea to vote on in a future release to add support for this capability instead of having to respecify the entire pager code to update only the counts in the corner.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.