ColumnSpan in GridViewSummaryRowItem

2 posts, 0 answers
  1. Sergey
    Sergey avatar
    1 posts
    Member since:
    Feb 2012

    Posted 25 Jul 2013 Link to this post

    Can anyone help me with creating static text column with colspan (no summary for this cell).

    Thanks
  2. Dimitar
    Admin
    Dimitar avatar
    2907 posts

    Posted 30 Jul 2013 Link to this post

    Hello Sergey,

    Thank you for writing.

    You can use either use HTML view where you can use your already created tables or you can use Column Groups View where you can create unlimited number of subgroups. Also consider the following code snippet where you can find an example of how to create ColumnGroupsViewDefinition without binding the grid to a database:
    this.radGridView1.Columns.Add(new GridViewTextBoxColumn("CompanyName"));
    this.radGridView1.Columns.Add(new GridViewTextBoxColumn("ContactName"));
     
    ColumnGroupsViewDefinition view = new ColumnGroupsViewDefinition();
    view.ColumnGroups.Add(new GridViewColumnGroup("Customer Contact"));
     
    view.ColumnGroups[0].Rows.Add(new GridViewColumnGroupRow());
    view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["CompanyName"]);
    view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["ContactName"]);
     
    this.radGridView1.ViewDefinition = view;
    for (int i = 0; i < 10; i++)
    {
        this.radGridView1.Rows.Add("test", i);
    }

    I hope this helps. Should you have any other questions, do not hesitate to ask.

    Regards,
    Dimitar
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top