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

Unable to resize grid. Error: Unable to get property 'GridDataDiv' of undefined or null reference

2 Answers 238 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sal
Top achievements
Rank 1
Sal asked on 07 May 2015, 09:16 PM

I have been using the follow code ( trimmed and cleaned for posting ) to resize the scrolling part of the div depending on how tall the browser is. After upgrading form Q3 2014 to Q1 2015 this error has started to be thrown. Thoughts?

01.function ResizeReviewersGrid() {
02.            if ($find("grid_id")) {
03. 
04.                var grid = $find("grid_id");
05. 
06.                if (grid.GridDataDiv) {
07. 
08.                    var scrollArea = grid.GridDataDiv;
09.                    var gridHeader = grid.GridHeaderDiv;
10. 
11.                    scrollArea.style.height = 500 - gridHeader.clientHeight + "px";
12. 
13.                    grid.repaint();
14.                }
15.            }
16.        }

2 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 12 May 2015, 08:17 AM
Hi Sal,

Note that the mentioned GridDataDiv is only rendered when the RadGrid's StaticHeaders are enabled. Please make sure that you have enabled static headers and see how it goes.

Regards,
Maria Ilieva
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Maria Ilieva
Telerik team
answered on 12 May 2015, 08:29 AM
Hi,

Also please try to access the RadGrid like that:
var grid = $find(<%=grid_id.ClientID%>)


Regards,
Maria Ilieva
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Grid
Asked by
Sal
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or