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

RadGrid Template Column not being hidden when scrollbars are enabled.

1 Answer 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 07 Jun 2012, 07:15 PM
Here is the RadGrid Control

<telerik:RadGrid ID="rgAttributeResultStatus" runat="server"
            onneeddatasource="rgAttributeResultStatus_NeedDataSource"
            AllowFilteringByColumn="True" AllowSorting="True"
            AutoGenerateColumns="False" CellSpacing="0" GridLines="None"
            onitemdatabound="rgAttributeResultStatus_ItemDataBound"
            onpageindexchanged="rgAttributeResultStatus_PageIndexChanged"
            onpagesizechanged="rgAttributeResultStatus_PageSizeChanged"
            onsortcommand="rgAttributeResultStatus_SortCommand"
            onitemcommand="rgAttributeResultStatus_ItemCommand"
            ShowStatusBar="True" Width="576px">
            <ClientSettings>
                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                <Resizing AllowResizeToFit="True" EnableRealTimeResize="True" />
            </ClientSettings>
<MasterTableView PageSize="10" ShowFooter="True" ShowHeader="true" FilterExpression="(ResultCount > 0)">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridTemplateColumn AllowFiltering="False" DataField="Id"
            FilterControlAltText="Filter chkID column" GroupByExpression="Id"
            HeaderText="Include In Search" SortExpression="Id" UniqueName="IncludeInSearch" HeaderStyle-Wrap="true" HeaderStyle-Width="80px">
            <ItemTemplate>
                <telerik:RadButton ID="rdBtnIncludeInSearch" runat="server" CommandName="IncludeInSearch"
                CommandArgument='<%# Eval("Id") %>'
                AutoPostBack="true"
                Text="Add" ></telerik:RadButton>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn DataField="Id"
            FilterControlAltText="Filter Id column" GroupByExpression="Id" HeaderText="Id"
            SortExpression="Id" UniqueName="Id" Visible="False">
            <ItemTemplate>
                <asp:Label ID="lblId" runat="server" Text='<%# Eval("Id") %>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
 
        <telerik:GridTemplateColumn DataField="AttributeDef.Name"
            FilterControlAltText="Filter AttributeName column"
            GroupByExpression="AttributeName" HeaderText="Attribute Name"
            SortExpression="AttributeName" UniqueName="AttributeName">
            <ItemTemplate>
                <asp:HyperLink
                    ID="lnkResultDetails"
                    runat="server" >
                <asp:Label ID="lblAttributeName" runat="server"
                    Text='<%# Eval("AttributeDef.Name") %>'></asp:Label>
                </asp:HyperLink>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="ResultCount"
            FilterControlAltText="Filter ResultCount column"
            GroupByExpression="ResultCount" HeaderText="Result Count"
            SortExpression="ResultCount" UniqueName="ResultCount"
            ForceExtractValue="Always" FooterText="Total Results: "
            CurrentFilterFunction="GreaterThan"
            DataType="System.Int64" Aggregate="Sum"
            AndCurrentFilterFunction="GreaterThan" AndCurrentFilterValue="0"
            CurrentFilterValue="0" DefaultInsertValue="0"
             HeaderStyle-Wrap="true" HeaderStyle-Width="100px"
             FilterControlWidth="20px"
            >
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="StatusDate" AllowFiltering="false" AllowSorting="false"
            FilterControlAltText="Filter StatusDate column" GroupByExpression="StatusDate"
            HeaderText="Status Date" UniqueName="StatusDate">
        </telerik:GridBoundColumn>
        <telerik:GridTemplateColumn DataField="AttributeDef.Id"
            FilterControlAltText="Filter AttributeId column"
            GroupByExpression="AttributeDef.Id" HeaderText="Attribute Id"
            SortExpression="AttributeDef.Id" UniqueName="AttributeId" Visible="False">
            <ItemTemplate>
                <asp:Label ID="lblAttributeId" runat="server"
                    Text='<%# Eval("AttributeDef.Id") %>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn DataField="AttributeDef.DetailPageUrl"
            FilterControlAltText="Filter DetailPageUrl column"
            GroupByExpression="AttributeDef.DetailPageUrl" HeaderText="Detail Page Url"
            SortExpression="AttributeDef.DetailPageUrl" UniqueName="DetailPageUrl" Visible="False">
            <ItemTemplate>
                <asp:Label ID="lblDetailPageUrl" runat="server"
                    Text='<%# Eval("AttributeDef.DetailPageUrl") %>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridBoundColumn DataField="DbColumnName"
            FilterControlAltText="Filter DbColumnName column"
            GroupByExpression="DbColumnName" HeaderText="Db Column Name"
            SortExpression="DbColumnName" UniqueName="DbColumnName" Visible="False">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn FilterControlAltText="Filter SchemaName column"
            GroupByExpression="SchemaName" HeaderText="Schema Name"
            SortExpression="SchemaName" UniqueName="SchemaName" Visible="False">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="SourceName"
            FilterControlAltText="Filter SourceName column" GroupByExpression="SourceName"
            HeaderText="Source Name" SortExpression="SourceName" UniqueName="SourceName"
            Visible="False">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="LevelOfDetailName"
            FilterControlAltText="Filter LevelOfDetailName column"
            GroupByExpression="LevelOfDetailName" HeaderText="Level Of Detail Name"
            SortExpression="LevelOfDetailName" UniqueName="LevelOfDetailName"
            Visible="False">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="SqlStatement"
            FilterControlAltText="Filter SqlStatement column"
            GroupByExpression="SqlStatement" HeaderText="SqlStatement"
            SortExpression="SqlStatement" UniqueName="SqlStatement" Visible="False">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn FilterControlAltText="Filter ErrorMessage column"
            GroupByExpression="ErrorMessage" HeaderText="Error Message"
            SortExpression="ErrorMessage" UniqueName="ErrorMessage" Visible="False">
        </telerik:GridBoundColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
    <PagerStyle Position="TopAndBottom" AlwaysVisible="True" />
</MasterTableView>
 
            <PagerStyle AlwaysVisible="True" />
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>

Please take a look at the image to understand what is going on.

Thanks,Jeff

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 08 Jun 2012, 06:19 AM
Hi Jeff,

Try setting the following CSS.
CSS:
<style type="text/css">
  .rgDataDiv
    {
        position: relative;
    }
</style>

Thanks,
Shinu.
Tags
Grid
Asked by
Jeff
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or