Posted 05 Dec 2011
Link to this post
I've got a simple RadGridView showing an ObservableCollection<> which is bound at run-time as the user can select which type to load. On the same grid I let my users dynamically create expression columns. All works fine and as expected excepting for the Export() function which doesn't seem to include any columns of type GridViewExpressionColumn.
This is how I create the columns at run-time:
var column =
column.Expression = **some LINQ expression here**
column.UniqueName = field.Name;
var btnExpressionColumn =
column.Header = btnExpressionColumn;
btnExpressionColumn.Content = field.Name;
And this is how I export the grid:
(Stream stream = dialog.OpenFile())
Format = ExportFormat.Csv,
Please advise on how to solve this problem.