Hi everybody
I'm trying export selected items from grid without group titles, but I have not success
This is my code:
The first Rebind() is "clearing" the selected items and the selected items are unselected, when ExportToExcel() is calling, all items are exported.
I need help, please
Some idea?
Thanks.
I'm trying export selected items from grid without group titles, but I have not success
This is my code:
| if (this.rgFacturas.SelectedItems.Count > 0) |
| { |
| GridGroupByExpressionCollection Coll = this.rgFacturas.MasterTableView.GroupByExpressions; |
| this.rgFacturas.MasterTableView.GroupByExpressions.Clear(); |
| foreach (GridDataItem item in this.rgFacturas.MasterTableView.Items) |
| { |
| item.Visible = item.Selected; |
| } |
| this.rgFacturas.Rebind(); |
| this.rgFacturas.ExportSettings.ExportOnlyData = true; |
| this.rgFacturas.ExportSettings.OpenInNewWindow = true; |
| this.rgFacturas.MasterTableView.ExportToExcel(); |
| this.rgFacturas.MasterTableView.GroupByExpressions.AddRange(Coll); |
| this.rgFacturas.Rebind(); |
| } |
The first Rebind() is "clearing" the selected items and the selected items are unselected, when ExportToExcel() is calling, all items are exported.
I need help, please
Some idea?
Thanks.