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

RadGrid Columns overlaping

4 Answers 226 Views
Grid
This is a migrated thread and some comments may be shown as answers.
edward ropero
Top achievements
Rank 1
edward ropero asked on 13 Aug 2010, 03:36 PM
Hi.

I have a RadGrid with AutoGenerateColumns="True", when there are several columns, the info and the Header titles overlap.

<telerik:RadGrid ID="grdReport" runat="server" AllowPaging="true" AutoGenerateColumns="True"
        BorderWidth="1px" GridLines="None" OnPageIndexChanged="grdReport_PageIndexChanged" PageSize="10"
        onitemdatabound="grdReport_ItemDataBound" >
                                        <PagerStyle AlwaysVisible="true"
                                        FirstPageToolTip="<%$ Resources:WebDexon, FirstPage %>"
                                        LastPageToolTip="<%$ Resources:WebDexon, LastPage %>" Mode="NextPrevAndNumeric"
                                        NextPagesToolTip="<%$ Resources:WebDexon, NextPages %>"
                                        NextPageToolTip="<%$ Resources:WebDexon, NextPage %>"
                                        PagerTextFormat="<%$ Resources:WebDexon, PagerTextFormat %>" Position="Bottom"
                                        PrevPagesToolTip="<%$ Resources:WebDexon, PrevPages %>"
                                        PrevPageToolTip="<%$ Resources:WebDexon, PrevPage %>" Visible="true" />
                                        <clientsettings scrolling-allowscroll="true"
                                        scrolling-usestaticheaders="true" Resizing-AllowColumnResize="true" Resizing-ClipCellContentOnResize="false">
<Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>
                                        </clientsettings>       
                                        <statusbarsettings loadingtext="<%$ Resources:WebDexon, Loading %>"
                                        readytext="<%$ Resources:WebDexon, Ready %>" />
                                        <ItemStyle Height="100%" />
                                        <mastertableview nodetailrecordstext="" nomasterrecordstext="" tablelayout="Fixed" Height="90%">
                                        </mastertableview>
                    </telerik:RadGrid>

protected void grdReport_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridPagerItem)
            {
                GridPagerItem pager = (GridPagerItem)e.Item;
                RadComboBox pageSizeComboBox = (RadComboBox)pager.FindControl("PageSizeComboBox");
                pageSizeComboBox.Visible = false;
                Label changePageSizelbl = (Label)pager.FindControl("ChangePageSizeLabel");
                changePageSizelbl.Visible = false;              
            }
        }

I've added a printscreen.
Is there any way to fix this?
I appreciate your response as soon as possible

4 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 16 Aug 2010, 04:32 PM
Hello Edward,

The column widths are too small and the cell content cannot fit. You can either increase the column widths or use the following CSS style, which will clip the unfitted cell content:

.RadGrid .rgClipCells .rgHeader,
.RadGrid .rgClipCells .rgFilterRow>td,
.RadGrid .rgClipCells .rgRow>td,
.RadGrid .rgClipCells .rgAltRow>td,
.RadGrid .rgClipCells .rgEditRow>td,
.RadGrid .rgClipCells .rgFooter>td
{
    overflow:hidden;
}


The rgClipCells CSS class should be set to the MasterTableView. This is done automatically in newer RadGrid versions when the MasterTableView's TableLayout is "Fixed" (e.g. when using static headers and some column widths are set).


Sincerely yours,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
edward ropero
Top achievements
Rank 1
answered on 17 Aug 2010, 03:39 PM
Hello Dimo,

the problem is that I cannot hide the columns info and I can not assign a fixed width because the grid must be filled automatically "AutoGenerateColumns="True"", I need the columns to automatically adjust its width to the content.
0
Dimo
Telerik team
answered on 17 Aug 2010, 03:52 PM
Hello Edward,

In this case you should do one of the following:

1) remove TableLayout="Fixed" from the MasterTableView if you are not using grouping and hierarchy and no column widths are set to any column
2) set a large-enough pixel width to the MasterTableView
3) set one common width for all columns like this:

<telerik:RadGrid ID="grdReport">
    <mastertableview nodetailrecordstext="" nomasterrecordstext="" tablelayout="Fixed" Height="90%">
        <HeaderStyle Width="200px" />
    </mastertableview>
</telerik:RadGrid>


Kind regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
edward ropero
Top achievements
Rank 1
answered on 17 Aug 2010, 04:46 PM
Thanks, it works as I spected
Tags
Grid
Asked by
edward ropero
Top achievements
Rank 1
Answers by
Dimo
Telerik team
edward ropero
Top achievements
Rank 1
Share this question
or