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

Horizontal scroll whitespace in the bottom of the RadGrid

1 Answer 44 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
NTR
Top achievements
Rank 1
NTR asked on 13 Nov 2012, 12:11 AM

I am retrieving data from database using RadGrid.  I have more columns in my RadGrid, so I need to show RadGrid horizontal scroll to keep the page from expanding but disable the vertical scroll so height of the grid should expand to always display all rows in the grid.  I got the result but there is whitespace in the bottom of the RadGrid.


My UI of the RadGrid:
-------------------------------

 <table style="table-layout: fixed;" width="100%" cellpadding="0" cellspacing="0"

        border="0">

        <tr>

            <td>

                <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="false" PagerStyle-AlwaysVisible="true"

                    CellPadding="0" CellSpacing="0" GridLines="None" Skin="Metro" CssClass="RadGrid_CBGrid"

                    HorizontalAlign="Left" AutoGenerateColumns="False" OnItemCommand="RadGrid1_ItemCommand"

                    OnDataBound="RadGrid1_DataBound">

                    <ClientSettings>

                        <Selecting CellSelectionMode="SingleCell"></Selecting>

                        <Scrolling AllowScroll="true" UseStaticHeaders="True"></Scrolling>

                    </ClientSettings>

                    <MasterTableView HierarchyLoadMode="Client" DataKeyNames="EmpID" AllowMultiColumnSorting="true"

                        Name="Parent">

                        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

                        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">

                        </RowIndicatorColumn>

                        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">

                        </ExpandCollapseColumn>

                        <Columns>

                            <telerik:GridBoundColumn DataField="EmpID" EmptyDataText="NA" HeaderText="Emp ID"

                                UniqueName="EmpID">

                            </telerik:GridBoundColumn>
                          and so on......
                          -------------------
                        </Columns>

                        <EditFormSettings>

                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">

                            </EditColumn>

                        </EditFormSettings>

                    </MasterTableView>

                    <FilterMenu EnableImageSprites="False">

                    </FilterMenu>

                </telerik:RadGrid>

            </td>

        </tr>

    </table>

 

 

If I changed  ClientSettings-Scrolling-AllowScroll="true" in RadGrid and <Scrolling AllowScroll="false" UseStaticHeaders="True"></Scrolling>

I got the result and there is NO whitespace in the bottom of the RadGrid BUT Horizontal scroll bar is NOT coming in my RadGrid.

 

So can anybody please give me the solution.

 

 

Thanks in Advance.

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 15 Nov 2012, 05:02 PM
Hi,

To expand the RadGrid vertically, depending on the number of its rows you can set ScrollHeight="". Give this suggestion a try and let me know if it works as you expected.

Regards,
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.
Tags
General Discussions
Asked by
NTR
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or