Problem with 100% height for a RadGrid in a UserControl

3 posts, 0 answers
  1. Teija
    Teija avatar
    23 posts
    Member since:
    Oct 2008

    Posted 21 Dec 2009 Link to this post

    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. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 22 Dec 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Teija
    Teija avatar
    23 posts
    Member since:
    Oct 2008

    Posted 22 Dec 2009 Link to this post

    Hi

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

    /Mathias
Back to Top