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

RadGrid Background Issue

1 Answer 63 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 01 Dec 2008, 09:24 PM
I notice when I style my page where I have a DIV to the left of the grid that the RadGrid will have it's white background take up the entire horizontal space, eating up space to the left (see attached file).

Below is my ASPX code:

    <div style="float: left; margin-top: 0px; padding-top: 0px; width: auto">
        <ul style="list-style: none">
            <li>
                <asp:Label ID="lblFromDate" runat="server" Text="From:" AssociatedControlID="rdpFromDate" />
                <telerik:raddatepicker id="rdpFromDate" runat="server"/>
            </li>
            <li style="margin-top: 20px; padding-top: 20px">
               <asp:Label ID="lblToDate" runat="server" Text="To:&nbsp;&nbsp;&nbsp;&nbsp;" AssociatedControlID="rdpToDate"/>
                <telerik:raddatepicker id="rdpToDate" runat="server"/>
            </li>
            <li>
                <telerik:radtreeview id="rtvCustomer" runat="server" height="400px" width="200px" style="float: left; margin-top: 10px" />
            </li>
            <li>
                <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" style="margin-top: 10px" />
            </li>
        </ul>
    </div>
    <telerik:radgrid id="rgTransactions" runat="server" gridlines="None" editmode="InPlace"
        showstatusbar="True" allowpaging="True" onneeddatasource="rgTransactions_NeedDataSource"
        onupdatecommand="rgTransactions_UpdateCommand" autogeneratecolumns="False">

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 02 Dec 2008, 09:07 AM
Hello Scott,

The observed behavior is expected and is caused by the fact that the first <div> is floated.

CSS Specification - Floats

Either float RadGrid as well, of set a sufficient amount of left margin for it.


All the best,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Scott
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or