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

[Solved] Spanning Columns in Footer

1 Answer 259 Views
Grid
This is a migrated thread and some comments may be shown as answers.
kencox
Top achievements
Rank 1
kencox asked on 08 Sep 2009, 08:37 PM
Hello,

Could someone point me to info on how to span columns in the RadGrid footer?  I've got summary information and labels that are too wide for one column.

Thanks,

Ken

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 09 Sep 2009, 05:14 AM
Hello Ken,

You can try out the following code to extend your footer cell over other cells by increasing the column span as shown below:
c#:
protected void RadGrid_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
    { 
        if (e.Item is GridFooterItem) 
        { 
            int colIndex = RadGrid.MasterTableView.GetColumn("ColumnUniqueName").OrderIndex;             
            GridFooterItem footer = (GridFooterItem)e.Item; 
            footer["ColumnUniqueName"].ColumnSpan = 5; 
            for (int i = (colIndex + 1); i < colIndex+5; i++) 
            { 
                footer.Cells[i].Visible = false
            } 
        } 
    } 

Thanks
Princy.
Tags
Grid
Asked by
kencox
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or