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

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

4 Answers 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 26 Jan 2009, 07:42 PM
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


4 Answers, 1 is accepted

Sort by
0
Reid
Top achievements
Rank 2
answered on 26 Jan 2009, 09:19 PM
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
0
Shinu
Top achievements
Rank 1
answered on 27 Jan 2009, 10:33 AM
Hi Mike,

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

ASPX:
  <GroupingSettings GroupByFieldsSeparator="  "  /> 


Thanks
Shinu.
0
Sam
Top achievements
Rank 1
answered on 23 Mar 2015, 08:53 PM
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. 
0
Eyup
Telerik team
answered on 26 Mar 2015, 11:32 AM
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.

 
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Reid
Top achievements
Rank 2
Shinu
Top achievements
Rank 1
Sam
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or