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

[Solved] Grid 100% height problem with dynamic control

2 Answers 124 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cedric
Top achievements
Rank 1
Cedric asked on 01 Jun 2009, 09:39 AM
I get a grid in a user control that I load dynamically in a PageView, using LoadControl.
I want the grid has a 100% height and width. But it didn't. The grid has a 100% width, but height is not set to 100%.
Only the grid header is visible.

I try various tricks I found on the forum and on the code library (this example : http://www.telerik.com/community/code-library/aspnet-ajax/ajax/how-to-set-100-height-and-random-styles-to-a-radajaxmanager-update-panel.aspx#590889) but that not works.

Is there a solution ?


2 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 02 Jun 2009, 06:34 AM
Hi Cedric,

Unfortunately I could not reproduce the problem on the live site. In order to find a quick solution/fix I will ask you to open a formal support ticket and send us a simple working test project which illustrates this erroneous behavior. Thus I could do all  my best to help you further in resolving it.

Additionally, note that according to the W3C CSS specification, an element with a height set in percent, must have a parent element with an explicit height set as well (either in percent or in pixels). The rule applies recursively.

Greetings,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Cedric
Top achievements
Rank 1
answered on 02 Jun 2009, 06:51 AM
Finally, I found a workaround :

I put the grid in a pane, and the pane in a splitter. Then, I used the splitter OnClientLoaded client method to resize the grid according to splitter height.

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