Completed
Last Updated: 15 Apr 2016 06:09 by ADMIN
ADMIN
Dimitar
Created on: 09 Mar 2016 11:58
Category: GridView
Type: Bug Report
1
FIX. RadGridView - the hidden columns are not considered when ColumnGroupViewDefinition is exported.
To reproduce:
Add the following view:
for (int i = 0; i < 8; i++)
{
    radGridView2.Columns.Add("Col" + (i+1));
}

ColumnGroupsViewDefinition view = new ColumnGroupsViewDefinition();
view.ColumnGroups.Add(new GridViewColumnGroup("G1"));
view.ColumnGroups.Add(new GridViewColumnGroup("G2"));
view.ColumnGroups.Add(new GridViewColumnGroup("G3"));

view.ColumnGroups[0].Rows.Add(new GridViewColumnGroupRow());
view.ColumnGroups[0].Rows[0].ColumnNames.Add("Col1");
view.ColumnGroups[0].Rows[0].ColumnNames.Add("Col2");
view.ColumnGroups[0].Rows[0].ColumnNames.Add("Col3");

view.ColumnGroups[1].Rows.Add(new GridViewColumnGroupRow());
view.ColumnGroups[1].Rows[0].ColumnNames.Add("Col4");
view.ColumnGroups[1].Rows[0].ColumnNames.Add("Col5");

view.ColumnGroups[2].Rows.Add(new GridViewColumnGroupRow());
view.ColumnGroups[2].Rows[0].ColumnNames.Add("Col6");
view.ColumnGroups[2].Rows[0].ColumnNames.Add("Col7");
view.ColumnGroups[2].Rows[0].ColumnNames.Add("Col8");

radGridView2.ViewDefinition = view;

for (int i = 0; i < 10; i++)
{
    radGridView2.Rows.Add("row"+i, "test","test","test","test","test","test");
}


radGridView2.Columns[2].IsVisible = false;
radGridView2.Columns[7].IsVisible = false;

- Then export the grid with the spread exporter.

0 comments