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

Problem with 100% height for a RadGrid in a UserControl

2 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Teija
Top achievements
Rank 1
Teija asked on 21 Dec 2009, 09:18 PM
In a previous thread people were discussing a problem with 100% height of a RadGrid placed in a RadSplitter.
When using a RadAjaxManager I was forced to include an event like:
    void contentpagecs_aspx_AjaxSettingCreated(object sender, AjaxSettingCreatedEventArgs e) 
    { 
        if (e.Initiator.ID == "GridView") 
        { 
            this.RadGrid1PanelClientID = e.UpdatePanel.ClientID; 
        } 
    } 
 
That solved my problem then. But I still dont really understand what I do when I set the PanelClientID like that.

No I have a Master page with a RadAjaxManager.
I have a WebForm, using that Master Page, containing a RadSplitter and in one of the RadPanes I have a UserControl.
The UserControl contains a RadGrid. The same RadGrid I used before.
In the UserControl I have a RadManagerProxy like:
<telerik:RadAjaxManagerProxy runat="server" ID="RadAjaxProxyGrid"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="MyGrid"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="MyGrid" LoadingPanelID="RadAjaxPanelMaster" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 

No I have the same problem like before. The RadGrid doesnt fill up the height in the RadPane in the container for my UserControl.
I guess I have to include a AjaxSettingCreated event like before. But how and where?
Can somebody explain in a good pedagogic way for me how to do that, what this solve and how it does that.

/Mathias

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 22 Dec 2009, 06:48 AM
Hi Mathias,

Setting an explicit height for the generated update panel helps the RadGrid expand vertically to 100%, because according to web standards, an element with a percentage height requires its parent element to have an explicit height set.

For MasterPage scenarios, please see the second post in

http://www.telerik.com/community/code-library/aspnet-ajax/ajax/how-to-set-100-height-and-random-styles-to-a-radajaxmanager-update-panel.aspx

Regards,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Teija
Top achievements
Rank 1
answered on 22 Dec 2009, 02:46 PM
Hi

Now I got it to work and think I understand the behavior better. Many thanx

/Mathias
Tags
Grid
Asked by
Teija
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Teija
Top achievements
Rank 1
Share this question
or