Header fo Column-Header / Header Grouping

7 posts, 1 answers
  1. Gernot
    Gernot avatar
    32 posts
    Member since:
    May 2008

    Posted 07 Jul 2008 Link to this post

    Hello,
    is it possible to create a Grid with the following structure:

    Header-Grouping

    Header1

    Header2

    Header3

    Header4

     Row

    Row

    Row

    Row



    Header1 to 4 are Column-Headers. I want to create a Header-Group. I need something like colspan... Is this posible with the RadGrid?

    Many Thanks for your help.




  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 07 Jul 2008 Link to this post

    Hi,

    You can use a GridTemplateColumn to achieve the desired scenario. Go through the following help article for more details.
    Customizing with GridTemplateColumn

    Thanks
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Gernot
    Gernot avatar
    32 posts
    Member since:
    May 2008

    Posted 08 Jul 2008 Link to this post

    Hello,
    thank you for your help.

    In this case the grid columns are bound columns :-(

    I think you cant use item-template with bound columns.

    Thanks
  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 08 Jul 2008 Link to this post

    Hi Alaeddin,

    The multi-header layout you request is attainable with GridTemplateColumns only (configuring their item template/header template appearance). Hence if this customization is a prerequisite for you, consider replacing your GridBoundColumns with template columns.

    Best regards,
    Stephen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 08 Jul 2008 Link to this post

    Hi Alaeddin,

    You can also have a look at the following code library submission.
    span cells in grid over multiple positions

    Thanks
    Princy.
  7. Gernot
    Gernot avatar
    32 posts
    Member since:
    May 2008

    Posted 08 Jul 2008 Link to this post

    I will give it a try ;-)

    Thank you for your great support guys ;-)
  8. Ryan Means
    Ryan Means avatar
    32 posts
    Member since:
    Dec 2006

    Posted 24 Mar 2009 Link to this post

    Here is an alternative used in a group footer example that is less difficult than the one described in the code sample span cells in grid over multiple.

     

    protected void rgSnapshotGrid_ItemDataBound(object sender, GridItemEventArgs e)  
    {  
        if (e.Item is GridGroupFooterItem)  
        {  
            //We assume that the total is in the last column  
            string columnGroupTotal = item.Cells[item.Cells.Count - 1].Text;  
            int cellCount = item.Cells.Count;  
     
            item.Cells.Clear();  
     
            TableCell cell = new TableCell();  
            cell.Text = String.Format("Account Subtotal: {0}", columnGroupTotal); ;  
            cell.ColumnSpan = cellCount;  
            cell.HorizontalAlign = HorizontalAlign.Right;  
     
            item.Cells.Add(cell);                  
        }  

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