1
votes

I am trying to set a kendo grid height to 100% . I did it before on a regular mvc project and its work ok but it is not working on mobile. Here what I am doing:

http://dojo.telerik.com/UVuDe

Thanks in advance

2

2 Answers

1
votes

have you tried using data-stretch="true" on the view? http://dojo.telerik.com/IKOLe

0
votes

well this piece of code seems to work in your dojo http://dojo.telerik.com/UVuDe/4:

function gridResize(size){

    if (size == null || size == undefined) {
        size = 0.6;
    }
    var windowHeight = $(window).height();
    windowHeight = windowHeight * size;
    $(".k-grid-content").height(windowHeight);

  }

I do have something a bit more generic/more configurable in another project if this doesn't work for you.

This will put the grid contents at a size of 60% of window's screen height in it's default state but you can configure this for your own needs.

Hopefully this gives you a starting place.

Any issues/changes you require let me know.