Height 100 percent failing

2 posts, 0 answers
  1. Jan Pfeffer
    Jan Pfeffer avatar
    55 posts
    Member since:
    Aug 2006

    Posted 25 Oct 2012 Link to this post

    Hey at Telerik

    I have the well known problem with height 100 percent not working. The width doesn't seem to work either.

    I have included a sample project illustrating my problem.

    http://kort2.lifa.dk/publicdownload/RadGridHeightIssuePacked.rar

    I would like the width and height of the RadGrid to max to the browser window. If the content is bigger than the browser window only the RadGrid will scroll.

    I have tried nomurous solutions without succes.

    Hope you can help me.

    Sincerly Jan
  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 29 Oct 2012 Link to this post

    Hi,

    In your case the problem comes from the fact that you have more than one element on the web page, which change their height on the client until the page is fully loaded. Therefore, the RadGrid height depends on other control height positioned on the top of the page.

    However, the only possible way to achieve your goal and set a different height to the RadGrid, e.g. calculate the available space on the screen is to use Javascript and set the RadGrid height client-side. An easier solution will be to use RadSplitter with two RadPanes - the top panel could contain the other controls, while the bottom one - the RadGrid. In this case you can keep the RadGrid's 100% height.

    Greetings,
    Pavlina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top