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

White Space In Grid View Footer and Column

3 Answers 296 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ALEX
Top achievements
Rank 1
ALEX asked on 15 Feb 2011, 03:58 AM
Hi Team,

        When i use rad gridview, i set customer paging and auto scroll. But i always see white space in end of row and end of column. I'm refer sample code and use default theme (Office 2007).  I gave Page size is 10. Please see my attachment . Kindly, suggestion to me.

<div style="margin-right: auto; margin-left: auto; margin-top: auto; width: 780px; border:solid 1px red">
    <div style="width: 100%; height: auto;" align="left">
        <table width="480px">
            <tr style="height: 20px" align="left">
                <td align="left" width="45%">
                    <asp:Label ID="Label1" runat="server" Text="Search By"></asp:Label>
                    <asp:DropDownList ID="_cboSearchBy" runat="server" Width="150px">
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:TextBox ID="_txtFind" runat="server" Width="139px"></asp:TextBox><asp:Button
                        ID="_btnSearch" runat="server" Text="Search" OnClick="_btnSearch_Click" />
                </td>
            </tr>
        </table>
    </div>
    <div style="width: 100%;" align="left">
        <table align="center">
            <tr>
                <td>
                    <telerik:RadGrid ID="_radGrid" runat="server" AutoGenerateColumns="False" GridLines="None"
                        OnPageIndexChanged="_radGrid_PageIndexChanged" EnableEmbeddedSkins="False" Skin="mscSkinOffice"
                        AllowPaging="True" AllowCustomPaging="True" OnPageSizeChanged="_radGrid_PageSizeChanged"
                        OnDataBound="_radGrid_DataBound" Width="770px">
                        <ClientSettings>
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="2"></Scrolling>
                            <Resizing AllowColumnResize="True" />
                        </ClientSettings>
                        <SortingSettings SortedBackColor="BurlyWood" />
                        <MasterTableView DataKeyNames="Key,No">
                            <CommandItemSettings ExportToPdfText="Export to Pdf" />
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" UniqueName="SelectColumn"
                                    Resizable="False">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="imgbtnSelected" runat="server" Text="Select"></asp:LinkButton>
                                    </ItemTemplate>
                                    <HeaderStyle Width="50px" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn DataField="Key" FilterControlAltText="Filter Key column"
                                    HeaderText="Key" SortExpression="Key" UniqueName="Key" Visible="False">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="No" FilterControlAltText="Filter No column" HeaderText="No."
                                    SortExpression="No" UniqueName="No">
                                    <ItemStyle Wrap="False" />
                                    <HeaderStyle Width="80px" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column"
                                    HeaderText="Name" SortExpression="Name" UniqueName="Name">
                                    <HeaderStyle Width="150px" />
                                    <ItemStyle Wrap="False" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Location_Code" FilterControlAltText="Filter Location_Code column"
                                    HeaderText="Location" SortExpression="Location_Code" UniqueName="Location_Code">
                                    <HeaderStyle Width="60px" />
                                    <ItemStyle Wrap="False" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Address" FilterControlAltText="Filter Address column"
                                    HeaderText="Address" SortExpression="Address" UniqueName="Address">
                                    <ItemStyle Wrap="False" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Address_2" FilterControlAltText="Filter Address_2 column"
                                    HeaderText="Address 2" SortExpression="Address_2" UniqueName="Address_2">
                                    <ItemStyle Wrap="False" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Phone_No" FilterControlAltText="Filter Phone_No column"
                                    HeaderText="Phone No." SortExpression="Phone_No" UniqueName="Phone_No">
                                    <ItemStyle Wrap="False" />
                                    <HeaderStyle Width="80px" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Contact_No" FilterControlAltText="Filter Contact_No column"
                                    HeaderText="Contact No." SortExpression="Contact_No" UniqueName="Contact_No">
                                    <ItemStyle Wrap="False" />
                                    <HeaderStyle Width="80px" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Contact" FilterControlAltText="Filter Contact column"
                                    HeaderText="Contact" SortExpression="Contact" UniqueName="Contact">
                                    <ItemStyle Wrap="False" />
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Credit_Limit_LCY" DataFormatString="{0:#,0.#0}"
                                    DataType="System.Decimal" FilterControlAltText="Filter Credit_Limit_LCY column"
                                    HeaderText="Credit Limit LCY" SortExpression="Credit_Limit_LCY" UniqueName="Credit_Limit_LCY">
                                    <HeaderStyle HorizontalAlign="Right" Width="70px" />
                                    <ItemStyle HorizontalAlign="Right" />
                                </telerik:GridBoundColumn>
                            </Columns>                                   
                            <ItemStyle HorizontalAlign="Left" />
                            <AlternatingItemStyle HorizontalAlign="Left" />
                        </MasterTableView>
                        <HeaderStyle Width="200px" HorizontalAlign="Left" />
                        <PagerStyle Mode="NextPrev" PagerTextFormat="{4}  Page <strong>{0}</strong> of <strong>{1}</strong>." />
                        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_mscSkinOffice" EnableEmbeddedSkins="False">
                        </HeaderContextMenu>
                        <FilterMenu EnableEmbeddedSkins="False" EnableImageSprites="False">
                        </FilterMenu>
                    </telerik:RadGrid>
                </td>
            </tr>
        </table>
    </div>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="_radGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="_radGrid" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
</div>

Best Regards,

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 15 Feb 2011, 09:25 AM
Hi ALEX,

The problem is caused by the fact that the sum of all widths of the last visible columns (when scrolling to the far right) does not match the available space for non-frozen columns. You can fix that by changing the widths of the last columns.Note that the RadGrid width matters in this case, so if the RadGrid width depends on its container,you will not be able to achieve a fixed-width frozen columns in all cases. Sorry for any inconvenience caused.

Kind regards,
Pavlina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
ALEX
Top achievements
Rank 1
answered on 17 Feb 2011, 02:30 AM
Hi Team,

          Thank for your reply. In my case i can be ignore Forzen column. If i don't use frozen column my column space will be fixed. Main point is white space of row. It is too ugly. I want to fixed grid when i open dialog box. Don't want to see any white space. Can you support to me. Pls see my attachment ... Kindly pls, advice to me.
0
Pavlina
Telerik team
answered on 17 Feb 2011, 02:53 PM
Hello ALEX,

Please refer to the link below for more information about how to resolve your problem:
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-scrolling-blank-space.aspx

All the best,
Pavlina
the Telerik team
Tags
Grid
Asked by
ALEX
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
ALEX
Top achievements
Rank 1
Share this question
or