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

RadGrid, Last Row gets added with massive Height

6 Answers 92 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Meaning Of Lights
Top achievements
Rank 2
Meaning Of Lights asked on 23 Oct 2008, 05:29 AM
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> 
 




6 Answers, 1 is accepted

Sort by
0
Meaning Of Lights
Top achievements
Rank 2
answered on 23 Oct 2008, 05:36 AM
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 :(
0
Meaning Of Lights
Top achievements
Rank 2
answered on 23 Oct 2008, 05:50 AM
Seems to be a common issue, but no resolution??

No solution - only support case
0
Dimo
Telerik team
answered on 23 Oct 2008, 08:12 AM
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.
0
Meaning Of Lights
Top achievements
Rank 2
answered on 23 Oct 2008, 10:18 PM
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



0
Dimo
Telerik team
answered on 24 Oct 2008, 07:32 AM
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.
0
Meaning Of Lights
Top achievements
Rank 2
answered on 29 Oct 2008, 02:58 AM
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






Tags
Grid
Asked by
Meaning Of Lights
Top achievements
Rank 2
Answers by
Meaning Of Lights
Top achievements
Rank 2
Dimo
Telerik team
Share this question
or