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

Setting grid width=100% height=100% with scrolls enabled

6 Answers 532 Views
Grid
This is a migrated thread and some comments may be shown as answers.
O§uz
Top achievements
Rank 2
O§uz asked on 31 May 2008, 11:21 AM

Hi,

I want to have grid dimensions height=100% and width=100% so that my grid fits to any container that i put.
But if i allow scrolling grid immediately collapses. I have tried "Changing grid ScrollHeight at runtime to fill its container height" in grid document also but it didnot solve my problem.

I try all possible page directives( like 

<!

DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

)

Thanks for your help

6 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 02 Jun 2008, 01:33 PM
Hi oguz,

Setting the Width property of the MasterTableView to 100% should solve your problem. Let us know how it goes.

Kind regards,
Veli
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
O§uz
Top achievements
Rank 2
answered on 02 Jun 2008, 03:16 PM
Hi Veli,

Unfortunately setting mastertabelview height and width to 100% did not change anything. I also use tablelayout=fixed in mastertableview. Bytheway are you Turkish?
0
Princy
Top achievements
Rank 2
answered on 03 Jun 2008, 06:45 AM
Hi, 

Have you gone through the following codelibrary submission?
Setting 100% height and resize on container resize for grid with scrolling and static headers

Princy.
0
Veli
Telerik team
answered on 04 Jun 2008, 08:40 AM
Hi Oguz,

Please have a look at the project suggested by Princy and see how it applies to your case. If problems persist, you may consider opening a regular support ticket and providing a sample project for us, where we can try to recreate the error.

Kind regards,
Veli
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
O§uz
Top achievements
Rank 2
answered on 05 Jun 2008, 06:01 PM
Hi Veli,

I have relaised something. I have a script manager in my masterpage. And I have RadAjaxManager like below. Not to postback grid during page changes.(I am using custom paging and my page size is 50 and i am binding 400 rows of  any data)

If i remove RadAjaxManager, my page succussfully resizes itself with its container as needed. But if i paste RadAjaxManager again, grid immediately collapses itself after page load.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnablePageHeadUpdate="False">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

0
Veli
Telerik team
answered on 06 Jun 2008, 11:42 AM
Hi Oguz,

When you place RadGrid inside a container, you need to set the Height property of the container to some fixed value in pixels. Generally speaking, when RadGrid is nested, at least one of the parent containers needs to have a fixed height in pixels. This is a browser issue connected to recalculating size of child items based on the container.

Additionally, try the following style:

<style type="text/css"
    html, body, form 
    { 
        height:100%; 
    } 
</style> 

This code library, as posted by Princy demonstrates the workaround for this problem.
I hope this helps.

Kind regards,
Veli
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
O§uz
Top achievements
Rank 2
Answers by
Veli
Telerik team
O§uz
Top achievements
Rank 2
Princy
Top achievements
Rank 2
Share this question
or