How do I get rid of the ";" Column Group Separator

5 posts, 0 answers
  1. Mike
    Mike avatar
    3 posts
    Member since:
    Oct 2006

    Posted 26 Jan 2009 Link to this post

    My grid is grouping FirstName, LastName Grade just fine. However it is puttng a ";" inbetween each column value in the group item row.
    Example: Michel; Hobbs; Grade:2
    I need it to be Michael Hobbs  Grade:2 without the ";".

    Is there any way to turn off the ";" so it doesn't show?

    Thanks,
    Michael Hobbs
    mrhobbs@cox-internet.com


  2. Reid
    Reid avatar
    317 posts
    Member since:
    Oct 2008

    Posted 26 Jan 2009 Link to this post

    Hi Mike,

    I am new to Telerik but had a recent task that was similar and solved it using the ItemDataBound event.  In this case my Group Headers were showing values such as "CountryName : Austrailia", "CountryName : United States", etc.  Below is how the code was formatted :

    protected void grdMenuItems_ItemDataBound(object sender, GridItemEventArgs e)  
        {  
            GridGroupHeaderItem groupHeaderItem = null;  
            GridTableCell groupTableCell = null;  
            string rawHeaderValue = string.Empty;  
             
            if ( e.Item is GridGroupHeaderItem )  
            {  
                groupHeaderItem = (GridGroupHeaderItem) e.Item;  
                groupTableCell = (GridTableCell) groupHeaderItem.DataCell;  
                groupTableCell.Text = ParseCountryName(groupTableCell.Text);  
            }  
        }  
     

    private string ParseCountryName(string rawHeader)  
    {         
      return rawHeader.Remove(0, 13);   

    Hope that helps. :)

    Reid
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 27 Jan 2009 Link to this post

    Hi Mike,

    You can also try setting the GroupByFieldsSeparator property in the GroupSettings to achieve the desired scenario.

    ASPX:
      <GroupingSettings GroupByFieldsSeparator="  "  /> 


    Thanks
    Shinu.
  5. Sam
    Sam avatar
    60 posts
    Member since:
    Mar 2011

    Posted 23 Mar 2015 Link to this post

    Can anyone from Telerik confirm that GroupByFieldsSeparator still works as expected? I tried setting it to a space, empty string and &nbsp; none of which worked and the color still appears in the header. 
  6. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 26 Mar 2015 Link to this post

    Hello Sam,

    I've created a sample RadGrid web site to demonstrate that the property works as expected. Please run the attached application and let me know about the result.

    Regards,
    Eyup
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017