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

Dynamically set grid height

1 Answer 555 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jaume Aguilo
Top achievements
Rank 1
Jaume Aguilo asked on 12 Jul 2012, 04:06 PM
I would like to do something like this in the Grid requestStartHandler:

var requestStartHandler = function (e) {
        var grid = $("#DefaultGrid").data("kendoGrid").height($(document).height() - 350);
    }

What is the Grid Client API to know how to set the height with JavaScript?
Best regards
Jaume Aguiló

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 16 Jul 2012, 08:40 AM
Hi Jaume Aguiló,

The Grid does not have a dedicated API dor settings its height. Generally, you should make a couple of Javascript calculations in order to find out what are the correct height values that should be applied to the Grid's wrapper and the scrollable data area. Please inspect the following example and let me know if there is anything unclear:

http://jsfiddle.net/dimodi/SDFsz/

All the best,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Jaume Aguilo
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or