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

ColumnSpan in GridViewSummaryRowItem

1 Answer 125 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sergey
Top achievements
Rank 1
Sergey asked on 25 Jul 2013, 07:50 AM
Can anyone help me with creating static text column with colspan (no summary for this cell).

Thanks

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 30 Jul 2013, 05:54 AM
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 >>
Tags
GridView
Asked by
Sergey
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or