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

[Solved] Grid / Group Footers

4 Answers 139 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Thaya
Top achievements
Rank 1
Thaya asked on 21 Aug 2009, 10:42 AM
Hi, I am using this example in my project.
http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/groupfooter/defaultcs.aspx

I wan to remove the collapse button/icon. Using code below, but it doent help.
<ExpandCollapseColumn Visible="false">
        </ExpandCollapseColumn>

I want also remove top row  (Unit  price), such that only columnheader is visible.

One example below indicate how I want to display the data:

Product name      Price
Category1
1                           10
2                            20
Sum                       30

Category2
1                           10
2                            20
3                           25
Sum                       55

Category3
1                           10
2                            20
4                           10
Sum                       40
---------------------------
Total sum             125

Pls help me soon.

Thanks
Thaya
    

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 Aug 2009, 11:04 AM
Hi Thaya,

Here is a help article which explains how to hide the GroupSplitterColumn.
Preventing groups expansion by hiding the expand/collapse images

Try setting the ShowGroupPanel property to false to prevent the Group by field from appearing on the top of the Grid.

Regards
Princy
0
Thaya
Top achievements
Rank 1
answered on 10 Sep 2009, 12:27 PM
Hi Princy!

Thanks for your answer. That help a bit, but I have still problem with hide the GridGroupSplitterColumn.
Tryed to set:
.MyRadGridCssClass  .rgGroupCol
{
  
padding-left: 0 !important;
  
padding-right: 0 !important;
}
But this do not help. Still appear as (group) expanded

Pls.. help me

Thanks
Thaya


0
Accepted
Princy
Top achievements
Rank 2
answered on 11 Sep 2009, 05:08 AM
Hi Thaya,

Give a try with the following code snippet and see whether it helps.

CS:
 
// to hide the Group Expand/Collapse image 
 protected void RadGrid2_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridGroupHeaderItem) 
        { 
            GridGroupHeaderItem GroupHeader = (GridGroupHeaderItem)e.Item; 
            ((System.Web.UI.WebControls.TableRow)(GroupHeader)).Cells[0].Visible = false
        } 
    } 
 
// to hide the Group Expand/Collapse column 
 
 protected void RadGrid2_ColumnCreated(object sender, GridColumnCreatedEventArgs e) 
    { 
        if (e.Column is GridGroupSplitterColumn) 
        { 
            e.Column.Display = false
        } 
    } 


Regards
Princy
0
Thaya
Top achievements
Rank 1
answered on 11 Sep 2009, 11:57 AM
That helps.

Thanks a lot!
Thaya
Tags
Grid
Asked by
Thaya
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Thaya
Top achievements
Rank 1
Share this question
or