RadGrid, Last Row gets added with massive Height

7 posts, 0 answers
  1. Meaning Of Lights
    Meaning Of Lights avatar
    24 posts
    Member since:
    Dec 2007

    Posted 23 Oct 2008 Link to this post

    Hi,

    This is my Grid:

    Last Row gets added with Height

    See how it has a last row, I didn't add that and I want to know how it gets added?

    Also notice how I've highlighted text in FireBug, the RadGrid is the Table and its in a DIV container with Height: 300px. When I use FireBug to remove the height the last row dissappears - just as I want.

    So my question is whats the setting causing the containing DIV to be 300px?

    <rad:RadGrid ID="RadGridGroup" runat="server" AutoGenerateColumns="False" GridLines="None" 
        ShowStatusBar="false" AllowPaging="false" ShowFooter="true" RadControlsDir="RadControls/"  
        OnItemCreated="RadGrid1_ItemCreated" OnItemDataBound="RadGrid1_ItemDataBound" Width="650px"
     
     <MasterTableView AutoGenerateColumns="False"
            <RowIndicatorColumn Visible="False"
                <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn Visible="False" Resizable="False"
                <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
            <Columns> 
            </Columns> 
        </MasterTableView> 
     
    </rad:RadGrid> 
     




  2. Meaning Of Lights
    Meaning Of Lights avatar
    24 posts
    Member since:
    Dec 2007

    Posted 23 Oct 2008 Link to this post

    The image will be available shortly, my Host is blocking it with a Firewall atm.

    Please dont reply "set Height to 100%" as that doesn't work :(
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Meaning Of Lights
    Meaning Of Lights avatar
    24 posts
    Member since:
    Dec 2007

    Posted 23 Oct 2008 Link to this post

    Seems to be a common issue, but no resolution??

    No solution - only support case
  5. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 23 Oct 2008 Link to this post

    Hi Jeremy,

    Please write again when your screenshot is available, so that we can see it.

    In the meantime, a couple of other notes:

    1) You have set ShowFooter="true". If the footer is not populated, it will appear as an empty row.

    2) RadGrid's default value for its Height and ScrollHeight properties is 300px.

    3) Height="100%" works as long as you set it correctly - when an HTML element has its height defined in percent, its parent must have a height as well.


    Kind regards,
    Dimo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Meaning Of Lights
    Meaning Of Lights avatar
    24 posts
    Member since:
    Dec 2007

    Posted 23 Oct 2008 Link to this post

    Here's the link to the screenshot:

    http://eventanalyser.appointmentsbook.com/LastRowHeight.jpg

    WebHost4Life block it when its clicked from your forum.

    I'll try your suggestions and then I'll give you a repro if I cant work it out.

    Cheers

    Jeremy



  7. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 24 Oct 2008 Link to this post

    Hi Jeremy,

    Thanks for the screenshot.

    The empty space that you are seeing below the last data row is expected to occur in the following case:

    1) you have enabled scrolling
    2) no Height or ScrollHeight is specified

    In this case the default height of RadGrid's data area is 300px. If the amount of data is less than this designated height, you will see this empty space at the bottom.

    You can change the height of RadGrid at runtime, if the datasource returns a small number of items. Alternatively, if RadGrid displays a small number of items most of the time, then it is better to disable scrolling or set a smaller height declaratively.

    Let us know if you need more information.


    Kind regards,
    Dimo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. Meaning Of Lights
    Meaning Of Lights avatar
    24 posts
    Member since:
    Dec 2007

    Posted 28 Oct 2008 Link to this post

    Thanks for your help Dimo!

    In the end I followed your advice and changed the height of RadGrid at runtime, if the datasource returns a small number of items (smaller than 300px)

    Bare bone example:

    this.RadGrid1.Height = Unit.Percentage(100);

    Thanks again






Back to Top
UI for ASP.NET Ajax is Ready for VS 2017