I created the columns and groupcolumn dynamically, but when export the grid, the error below appears:
Invalid column group configuration! Column "Code" cannot be after column "Name"
So I put the IsPostBack event (see below), and the error not appears more, but the group header not appear in file exported.
if
(!Page.IsPostBack)
{
columnGroup = grdDados.MasterTableView.ColumnGroups.FindGroupByName(row[
"Nome"
].ToString()
);
if
(columnGroup ==
null
)
{
columnGroup =
new
GridColumnGroup();
columnGroup.HeaderText = row[
"Nome"
].ToString();
columnGroup.Name = row[
"Nome"
].ToString()
;
grdDados.MasterTableView.ColumnGroups.Add(columnGroup);
}
Help-me!!!!
if
(!Page.IsPostBack)
{
columnGroup = grdDados.MasterTableView.ColumnGroups.FindGroupByName(row[
"Nome"
].ToString()
);
if
(columnGroup ==
null
)
{
columnGroup =
new
GridColumnGroup();
columnGroup.HeaderText = row[
"Nome"
].ToString();
columnGroup.Name = row[
"Nome"
].ToString()
;
grdDados.MasterTableView.ColumnGroups.Add(columnGroup);
}