Home General Discussion

Increase Chart Rows Beyond 10?

Martin_McNultyMartin_McNulty Customer IT Monkey ✭

First post here and pretty new to the environment so apologies if I'm asking in the wrong place. The SQL Table Widget within the portal only shows 10 rows of a report by default, as does the chart filter grid that appears when you click on a chart group. Is there a simple way to increase this beyond 10 default rows?

Answers

  • Shane_WhiteShane_White Cireson Support Super IT Monkey ✭✭✭✭✭

    Hi @Martin_McNulty

    Which version of the Portal are you running?

    Below are 2 different scenarios, 1 SQL Table Widget with a SELECT * (All columns) function and 1 SQL Table where I have specifiec columns (more than 10), both display all rows and is not limited to 10:

    Thanks,

    Shane.

  • Martin_McNultyMartin_McNulty Customer IT Monkey ✭

    Hi @Shane_White ,

    It's the row count rather than the column count. The SQL query doesn't limit the return at all. The default item count is set to 10 though, as below (excuse the red lines!):

    SQL Table Widget


    SQL Chart Widget (Columns, with 'Display Selected Item' enabled)


  • Shane_WhiteShane_White Cireson Support Super IT Monkey ✭✭✭✭✭

    Hi @Martin_McNulty

    Ahh I see what you mean now! So I know you could probably do this with Javascript but one easier way might be quite simple once you change it once it will stay like that for all your current logged in user until your browser cache is cleared.

    Keeping it loading in 10 is better for performance especially if you were to have lots of SQL queries on the same page.

    Is there a particular reason you are looking to increase this default?

    Thanks,

    Shane

  • Martin_McNultyMartin_McNulty Customer IT Monkey ✭

    I figured re-creating a custom version of the page is probably one way to go about it; I just wondered if there was an easy built-in method.

    That first image has a report where the number of rows is - and likely always will be - 11. So for it to default to 10 is unfortunate. Would be nice if it showed all 11 rows when hitting the page.

  • Shane_WhiteShane_White Cireson Support Super IT Monkey ✭✭✭✭✭

    @Martin_McNulty

    Okay that makes sense, I am working on some custom code to see if I can do this, I will do it with the existing options from the drop down as otherwise I would need to append the dropdown to include 11 as a value.

    Will keep you posted.

    Thanks,

    Shane

  • Martin_McNultyMartin_McNulty Customer IT Monkey ✭

    Hi @Shane_White ,

    The existing options are fine, it's simply just the ability to set the default to any of the other options I seek.

    If you happen to find a simple method of doing this at any point then let me know!

  • Dean_LinternDean_Lintern Customer IT Monkey ✭

    @Shane_White Hi Shane, we are looking for the same thing, did you ever get chance to complete any custom code to achieve this?

    Thanks

  • Shane_WhiteShane_White Cireson Support Super IT Monkey ✭✭✭✭✭
    edited January 2020

    Hi @Martin_McNulty + @Dean_Lintern

    Can you guys give this code a try and let me know how you get on?

    $(document).on('ajaxStop', function() {

    if ($('.grid-container.k-grid').length > 0) {

    var grid = $('.grid-container.k-grid').data("kendoGrid");

    grid.dataSource.pageSize(15);

    grid.refresh();

    };

    $(document).off('ajaxStop');

    });

    Thanks,

    Shane

  • Shane_WhiteShane_White Cireson Support Super IT Monkey ✭✭✭✭✭

    Just made an edit to the code to include an if statement so it checks that the grid exists first before trying to run the code!

    Thanks,

    Shane

Sign In or Register to comment.