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

RadGrid Grouping

2 Answers 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ali Akbar
Top achievements
Rank 1
Ali Akbar asked on 04 Aug 2009, 01:03 PM
When grouping data i am also getting the GroupField name i dont want it, i just need the value.

Thanks a million in advance.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 04 Aug 2009, 01:35 PM
Hello Ali,

You can try out the following code to display only the value in the group header row:
c#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if(e.Item is GridGroupHeaderItem) 
        { 
            GridGroupHeaderItem item = (GridGroupHeaderItem)e.Item; 
            DataRowView groupDataRow = (DataRowView)e.Item.DataItem; 
            string[] myArr = item.DataCell.Text.Split(':'); 
            item.DataCell.Text = myArr[1].Trim(); 
 
        } 
    } 

Thanks
Shinu.
0
Ali Akbar
Top achievements
Rank 1
answered on 04 Aug 2009, 01:37 PM
thanks a lot shinu..


Tags
Grid
Asked by
Ali Akbar
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Ali Akbar
Top achievements
Rank 1
Share this question
or