I am using Telerik controls for Silverlight (Version: 2012.1.215.1050).
I am using gridView.ToCSV()
method to export the data to a CSV file.
Its working well If I exports all the records from the grid.
But in my case, I need to upload the records which are active, and the Column order in the exported file should be same as the grid column order.
If I use the gridview.Items.Remove(item) and then export then, it is removing the item from the grid also. So I cant use this.
I tried creating a new GridView and attacching the gridview items by checking the active condition. In this case the column order in the exported file is not similar to the grid displayed. In the exported file the columns are in the alphabetical order.
Please suggest a way for exporting the "Active" records, with the column order same as the grid displayed.
RadGridView dgGrid = commandParameter
ObservableCollection<EmployeeDTO> CItems =
item = 0; item < dgGrid.Items.Count; item++)
emp = dgGrid.Items[item]
RadGridView exportGrid =
exportGrid.ItemsSource = CItems;
strFileContent = exportGrid.ToCsv(