I use this snippet to export to excel all the data in RadGrid, viable and not visible, with some columns filtered out:
It is working fine. My problem is with two columns where the values are exported with the formatting "." and "$" that I do not won't to be exported. Is there a way to replace those two chars with "" or to avoid the formatting to get exported?
protected void ExpExcel_Click(object sender, EventArgs e){ foreach (GridColumn col in RadGrid1.MasterTableView.Columns) { if (col.UniqueName.Contains("notes") || (col.UniqueName.Contains("EditCommandColumn")) || (col.UniqueName.Contains("column1"))) { col.Display = false; } else { col.Display = true; } } foreach (GridFilteringItem item in RadGrid1.MasterTableView.GetItems(GridItemType.FilteringItem)) item.Visible = false; RadGrid1.ExportSettings.ExportOnlyData = true; RadGrid1.MasterTableView.ExportToExcel(); }