Grid height 100% fixed columns

1 Answer 148 Views
Grid ScrollView
Nayeli
Top achievements
Rank 1
Nayeli asked on 03 Oct 2022, 09:04 PM

Hello,

I need a grid to fill 100% of the container. The grid is inside a view that has a header and footer layout. What I need is for the grid to have a vertical scroll but not to overflow the container so that the scroll is displayed in the grid and not in the browser window. Also 2 of the columns are fixed (the first 2 columns).

Thanks

1 Answer, 1 is accepted

Sort by
0
Stoyan
Telerik team
answered on 06 Oct 2022, 01:36 PM

Hi Nayeli,

To make the Grid fill its container you need to configure the Height and Width configurations of the Component to take 100% of the available space:

    .Height("100%")
    .Width("100%")

In addition ensure that the padding of the container and the margin of the Grid is set to 0px:

    .container{
        background-color:red;
        height:900px;
        padding:0px;
    }
    .k-grid{
        margin:0px;
     }

You can review the behavior of the suggestions above in this Telerik REPL. There you will notice that, if the recommended configurations are removed the container which is colored in red shows up.

If the issue persists, please modify the REPL to replicate it and send it back to me to investigate. Thank you.

Regards,
Stoyan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid ScrollView
Asked by
Nayeli
Top achievements
Rank 1
Answers by
Stoyan
Telerik team
Share this question
or