This is a migrated thread and some comments may be shown as answers.

kendo.ui.grid using full browser window and autosizing

3 Answers 453 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Emil
Top achievements
Rank 1
Emil asked on 14 Feb 2017, 10:44 AM

I decided to start a new thread since I now understand the problem better.

Im using a standard visual studio bootstrap 3 template as basis for a textbox and kendo.ui.grid grid.

 

I managed to get the grid to be full screen width and follow the browser when sized (only width, not height), that is shrink if you shrink the browser size.

My grid allways starts in about 1/3 of the screen size (height, width is fine), and even though I set the pagesize in the grid to 40 rows that doesnt change.

Is there a way that I can let the grid height use the browser height without having a scrollbar ? also follow its size when I resize the browser.

I would also like to be able to accomodate different resolutions and possibly pads or mobile devices.

I did have a look at a demo where this was nicely done in jfiddle, but I never managed to find the settings that controlled it, I tried copying every setting I found there over to my project to no avail.

The only difference I see is that my grid is constructed in .cshtml page but your demo is in javascript and only done clientside.

My grid gets it data from server side calls, so I cannot use client side only, but yes I could use ajax calls to get my data.

Regards,

Emil

 

3 Answers, 1 is accepted

Sort by
0
Emil
Top achievements
Rank 1
answered on 14 Feb 2017, 11:53 AM

I found that using

    .HtmlAttributes(new { style = "height:90%;" })

on the grid itself.

seems to be the closest thing to solving my problem.

it works and looks ok if the browser window is fullscreen or close to that. when its smaller I start to loose things of screen.

Ideas ?

Regards,

Emil

 

0
Accepted
Konstantin Dikov
Telerik team
answered on 16 Feb 2017, 08:47 AM
Hi Emil,

Can you please elaborate which parts of the Grid you are losing when the browser's window gets too small? You can attach screenshot or a short video demonstrating the issues, so we can have a better idea of the problem.


Regards,
Konstantin Dikov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Emil
Top achievements
Rank 1
answered on 16 Feb 2017, 08:52 AM

I was really just going the wrong route.

 

I had an excellent answer in this thread

http://www.telerik.com/forums/kendo-ui-grid-using-full-browser-window-and-autosizing#jX3KUObxTEqjP0BTO_mcYg

which resizes the grid perfectly.

 

I was resizing just a part of the screen or actually I was just resizing the grid itself, it was a nice try but the other resizing solution is much much better and flawless.

Its not a problem with the grid itself. So lets just end this thread and point to the solution in the other thread.

Regards,

Emil

Tags
Grid
Asked by
Emil
Top achievements
Rank 1
Answers by
Emil
Top achievements
Rank 1
Konstantin Dikov
Telerik team
Share this question
or