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

Losing RadGrid footer after window.showModalDialog

2 Answers 123 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 23 Jun 2011, 05:47 PM
We have a window with a RadGrid with a footer.  When the window opens, the footer displays correctly at the bottom of the grid.  The window contains several buttons that cause a script to be registered that executes window.showModalDialog() to display a popup window.  When the popup opens, the footer disappears (although it is still in the rendered html).  When the user closes the popup, the footer reappears.

Looking at the html, I see that the grid is rendered as a div with a height of 190px.  This div contains a div for the header, a div for the main area of the grid, and a grid for the footer.  The header and footer divs do not specify a height but the middle div specifies a height of 300px.  Somewhere this is being converted to 122px, leaving room for the header and footer.  Apparently whatever adjusts the height is not being called when the window is refreshed after the user clicks on one of the buttons.  As a result, the middle div retains a height of 300px and the footer does not appear.

Is there a workaround for this?

Thanks,
Stephen

2 Answers, 1 is accepted

Sort by
0
Stephen
Top achievements
Rank 1
answered on 29 Jun 2011, 06:59 PM
Adding the following to the stylesheet for this form fixed this problem:

.rgDataDiv
{
    height: 122px !important;
}

We did not have any styles that affect this grid so this must be overriding some Telerik code somewhere.

I would appreciate it if somebody could offer a workaround that doesn't require hardcoding the height of the data div.  If we ever change the height of the RadGrid, we will have to remember to go here to change this value.

Stephen
0
Pavlina
Telerik team
answered on 05 Jul 2011, 12:04 PM
Hello Stephen,

I suggest that you try setting the grid ScrollHeight property as described here and see if it makes any difference.

Additionally, keep in mind that if the grid is nested inside containers, at least one of them should have fixed height dimension in pixels. Thus the control will calculate its dimensions in regards with this container pixel height. You can refer to the code library below for more information:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/setting-100-height-and-resize-on-container-resize-for-grid-with-scrolling-and-static-headers.aspx

Regards,
Pavlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Stephen
Top achievements
Rank 1
Answers by
Stephen
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or