How to set Grid PageSize 'All' by wrapper?

10 posts, 1 answers
  1. JASON
    JASON avatar
    1 posts
    Member since:
    Oct 2014

    Posted 02 Jul 2015 Link to this post

    Hi,
    The lastest release version (2015.2.624) add a useful feature that display 'all' option in pager.
    But I didn't find it in ASP.NET MVC Wrapper function.
    I try insert '0' pagesize and it seems as same as 'all' option.

    .Pageable(pager => pager.PageSizes(new int[] { 5, 10, 20, 0 }))

    But it displayed '0' in pager and I didn't find the method that change the 'all' message by MVC Wrapper.
    It seems not exist in pager.Messages.

    Can someone advise me, please?
  2. Answer
    Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 06 Jul 2015 Link to this post

    Hello,

    In MVC wrappers the page sizes drop down containing “all” as option can be set with following declaration:

    .Pageable(x => x.PageSizes(new List<object> { 10, 20, "all" }).Refresh(true))

    However in the official Q2 version this setup leads to error. The good news is that this was fixed and the fix is available into the latest internal build. In order to use it you need to download the latest internal build dll.

    If you need further assistance, do not hesitate to contact us again.

    Regards,
    Radoslav
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Scott
    Scott avatar
    4 posts
    Member since:
    May 2014

    Posted 30 Sep 2015 in reply to Radoslav Link to this post

    It looks like this made it in to the last public release (2015.3.916) and I can successfully set the values for the page sizes dropdown. However, when I select "all", it doesn't actually display all of the records. It displays the "loading" progress bar like it's working, but still always displays the same number of records as previously shown. (For example, if I had selected 10 to show 10 records per page and then select "all", it still only shows 10 records per page.
  5. Scott
    Scott avatar
    4 posts
    Member since:
    May 2014

    Posted 30 Sep 2015 in reply to Scott Link to this post

    Following up, it also looks like this is broken in regards to filtering the grid. If I have selected "all" and then filter the grid, it does actually show me all of the records, but then I can't clear the filter until I change the page size to something other than "all".
  6. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 02 Oct 2015 Link to this post

    Hello Scott,

    I tried to reproduce the described issues on my side but to no avail. I am sending you a simple example with the 2015.3.916 version of the wrappers and scripts. Please check it out and let me know what differs in your case.
    Additionally at a meantime could you please check that you have mvc dll and javascript files with the same 2015.3.916 version at your end?

    Looking forward for your reply.

    Regards,
    Radoslav
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  7. Antonio
    Antonio avatar
    3 posts
    Member since:
    Sep 2014

    Posted 07 Apr in reply to Radoslav Link to this post

    Hi Radoslav,

    We would like to use the "all" option to display all elements in a page, but we need to be able to translate its displayed value to any other language, using an application string resource.

    "all", "todos", "alle"...

    Is it possible?

    Thanks.

  8. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 08 Apr Link to this post

    Hello Antonio,

    To achieve the desired functionality you can use localization capabilities of the kendo grid widget. More information and live demo you can find here:
    http://demos.telerik.com/kendo-ui/grid/localization
    http://docs.telerik.com/kendo-ui/framework/localization/overview

    I hope this helps.

    Regards,
    Radoslav
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  9. Antonio
    Antonio avatar
    3 posts
    Member since:
    Sep 2014

    Posted 11 Apr in reply to Radoslav Link to this post

    Hi Radoslav.

    Thanks for your help, we have found that in spanish and german the string "All" not is translated, is "All" in both cases.(spanish: "Todos", german : "Alle").

    For sample in kendo.messages.es-ES.min.js, kendo.ui.Pager.prototype.options.messages,{allPages:"All".

    Moreover, where can translate strings like "items per page"?

    Thanks in advance.

  10. Antonio
    Antonio avatar
    3 posts
    Member since:
    Sep 2014

    Posted 11 Apr Link to this post

    I forget mention the kendo version: 2016.1.112
  11. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 12 Apr Link to this post

    Hello Antonio,

    Indeed I verified that the Spanish and German does not have translation for the ‘all’ pager option. However please note that the translations are not available for every language and some of the localization files may be incomplete. For more information on where to find the full list of available translations, refer to the section on contributing.

    Also the string "items per page" can be found in the
    kendo.ui.Pager.prototype.options.messages, itemsPerPage option.

    I hope this helps.

    Regards,
    Radoslav
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready