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

Unable to dynamically set the height of a Kendo grid under iOS

2 Answers 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 31 Jan 2020, 02:26 PM

I have the following code to dynamically set the height of a Kendo MVC grid. This works on any Windows based browser. However, it does not work in Chrome or Safari on an iOS device. Would you know why this isn't working? Or, is there a better way to change the height of a grid after it's been initialized?

 

var grid = $("#grid").data("kendoGrid");
$("#grid").css("height", 500);
grid.resize()
grid.redraw();

2 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 04 Feb 2020, 09:21 AM

Hello Randy,

The grid does not have a redraw method and thus when the last line is called a JavaScript error will occur. If it is being removed you should not experience any problems resizing the grid. I have tested the approach using this dojo and it seems to work. If you click the button above the grid it will get resized on iOS device.

Regards,
Angel Petrov
Progress Telerik

Get quickly onboarded and successful with your Telerik UI for ASP.NET MVC with the dedicated Virtual Classroom technical training, available to all active customers.
0
Randy
Top achievements
Rank 1
answered on 04 Feb 2020, 11:37 AM
Thank you. This does seem to work now.
Tags
Grid
Asked by
Randy
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Randy
Top achievements
Rank 1
Share this question
or