Simple header colspan

6 posts, 0 answers
  1. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 09 Nov 2015 Link to this post

    I am trying to build a Simple (one level) header colspan in which one header should span two columns.

    I should I configure MultiColumnHeader to do this?

     

    Marc

  2. Kostadin
    Admin
    Kostadin avatar
    1711 posts

    Posted 12 Nov 2015 Link to this post

    Hi Marc,

    Please check out the following live example which demonstrates how to use multi column header. I would recommend you to use this approach instead merging a header cells.

    Regards,
    Kostadin
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 12 Nov 2015 in reply to Kostadin Link to this post

    All examples I can find (also the one you proposed) are with multi-row.

    What I want is a simple one row header with a colspan.

    Can you please give example for that?

     

    Marc

  5. Kostadin
    Admin
    Kostadin avatar
    1711 posts

    Posted 16 Nov 2015 Link to this post

    Hello Marc,

    I am afraid we does not support merging grid cells. The reason is that some of the grid features might not work correctly. For instance, sorting, filtering etc.

    Regards,
    Kostadin
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 17 Nov 2015 in reply to Kostadin Link to this post

    I meant this:

     

    http://d585tldpucybw.cloudfront.net/forums/merging-footer-columns

     ​

  7. Kostadin
    Admin
    Kostadin avatar
    1711 posts

    Posted 20 Nov 2015 Link to this post

    Hello,

    You can use the approach from the forum and also there is a code library but you should note that we do not support cells merging. Generally you can access the header item by using the GetItems method of the MasterTable view and use ColumnSpan.
    protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
        GridHeaderItem header = RadGrid1.MasterTableView.GetItems(GridItemType.Header)[0] as GridHeaderItem;
        header["FirstColumnUniqueName"].ColumnSpan = 2;
        header["SecondColumnUniqueName"].Visible = false;
    }

    Nevertheless, as I already mentioned many of the built-in features might not work correctly when using this approach.

    Regards,
    Kostadin
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017