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

RadGrid Grouping Issue

1 Answer 69 Views
This is a migrated thread and some comments may be shown as answers.
Kevin Kurtz
Top achievements
Rank 1
Kevin Kurtz asked on 19 Apr 2010, 11:17 PM

It seems I am having an issue with the grid adding un-needed functionality to my grid.  Specifically, I am trying to create an list of news articles, sorted by month (Jan, Feb, etc.) with the articles listed within each month.  I am NOT using skins for the control, and instead, using standard HTML code to format the list since our site is not using anything fancy at this moment.

What I would like to do is not have the button to allow the expanding/collapsing of the categories (see attached screen shot).  I tried using the documentation at this link (  but it seems as though the code behind is not being read at runtime.  I am putting my code below so you can see how I have done this.  A quick response is greatly appreciated.  Thank you!


    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        ShowHeader="false" EnableEmbeddedSkins="False"
<HeaderContextMenu EnableEmbeddedSkins="False"></HeaderContextMenu> 
        <MasterTableView DataKeyNames="NewsID" GroupLoadMode="Server"
                            <telerik:GridGroupByField FieldName="MonthYear" HeaderText=" " SortOrder="None"></telerik:GridGroupByField>                                                         
                            <telerik:GridGroupByField FieldName="MonthYear" HeaderText=" " SortOrder="Descending"></telerik:GridGroupByField>                            
            <telerik:GridTemplateColumn HeaderText="Date" GroupByExpression="Month Date Group By Month" DataType="System.DateTime" > 
                <asp:Label ID="Label1" runat="server" Text='<%# Eval("dtNewsDate") %>' DataType="System.DateTime" ></asp:Label></b
                        <asp:Label ID="lblPublication" runat="server" Text='<%# Eval("strPublication") %>'></asp:Label></b><br /> 
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("strArticleLink") %>' 
                            <asp:Label ID="lblArticleTitle" runat="server" Text='<%# Eval("strArticleTitle") %>'></asp:Label> 
                    <br /> 
                    <asp:Label ID="lblArticleSynopsis" runat="server" Text='<%# Eval("strArticleSynopsis") %>'></asp:Label> 
                    <br /> 
<EditColumn InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif" EditImageUrl="Edit.gif" CancelImageUrl="Cancel.gif"></EditColumn> 
            <ClientSettings AllowExpandCollapse="False"
                <Resizing AllowColumnResize="True" /> 
<FilterMenu EnableEmbeddedSkins="False"></FilterMenu> 

The code-behind:
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using Telerik.Web.UI; 
public partial class AboutUs_NewsRoom_News : System.Web.UI.Page 
    protected void Page_Load(object sender, EventArgs e) 
        Master.imgHeroTitle = "~/img/hero-news.gif"
        Master.HeroClass = "hero_"
        ucAboutNav1.NewsPanel = true
        if (!IsPostBack) 
    public void LoadGrid() 
        gridNews.DataSource = new List<string>(0); 
        gridNews.DataSource = MainName.core.CMS.News.GetNewsList(); 
        MainName.core.CMS.News n = new MainName.core.CMS.News(); 
    protected void gridNews_ColumnCreated(object sender, GridColumnCreatedEventArgs e) 
        if (e.Column is GridGroupSplitterColumn) 
            e.Column.HeaderStyle.Width = Unit.Pixel(1); 
            e.Column.HeaderStyle.Font.Size = FontUnit.Point(1); 
            e.Column.ItemStyle.Width = Unit.Pixel(1); 
            e.Column.ItemStyle.Font.Size = FontUnit.Point(1); 
            e.Column.Resizable = false
    protected void gridNews_ItemCreated(object sender, GridItemEventArgs e) 
        if (e.Item is GridGroupHeaderItem) 
            (e.Item as GridGroupHeaderItem).Cells[0].Controls.Clear(); 

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 21 Apr 2010, 12:00 PM
Hello Kevin,

Please, note that simple data-binding through the DataBind() method can be used in simple scenarios which do not require the grid to perform complex operations such as grouping. Therefore, I suggest that you bind the Grid using AdvanceDataBinding techniques. In this way, you could disable the GridGroupSplitterColumn so that users can't collapse the groups in a grid as described in the help article below:
Preventing groups expansion by hiding the expand/collapse images

Additionally, I noticed that you have opened a duplicate post on the same matter. Please, refer to the other support ticket post for additional information. To avoid duplicate posts, we can continue our communication there.

Kind regards,
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.
Asked by
Kevin Kurtz
Top achievements
Rank 1
Answers by
Telerik team
Share this question