To reproduce: Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.CustomersTableAdapter.Fill(Me.NwindDataSet.Customers) Dim view As New ColumnGroupsViewDefinition() view.ColumnGroups.Add(New GridViewColumnGroup("Customer Contact")) view.ColumnGroups.Add(New GridViewColumnGroup("Details")) view.ColumnGroups(1).Groups.Add(New GridViewColumnGroup("Address")) view.ColumnGroups(1).Groups.Add(New GridViewColumnGroup("Contact")) view.ColumnGroups(0).Rows.Add(New GridViewColumnGroupRow()) view.ColumnGroups(0).Rows(0).Columns.Add(Me.RadGridView1.Columns("CompanyName")) view.ColumnGroups(0).Rows(0).Columns.Add(Me.RadGridView1.Columns("ContactName")) view.ColumnGroups(0).Rows(0).Columns.Add(Me.RadGridView1.Columns("ContactTitle")) view.ColumnGroups(1).Groups(0).Rows.Add(New GridViewColumnGroupRow()) view.ColumnGroups(1).Groups(0).Rows(0).Columns.Add(Me.RadGridView1.Columns("Address")) view.ColumnGroups(1).Groups(0).Rows(0).Columns.Add(Me.RadGridView1.Columns("City")) view.ColumnGroups(1).Groups(0).Rows(0).Columns(1).RowSpan = 40 view.ColumnGroups(1).Groups(0).Rows(0).Columns.Add(Me.RadGridView1.Columns("Country")) view.ColumnGroups(1).Groups(1).Rows.Add(New GridViewColumnGroupRow()) view.ColumnGroups(1).Groups(1).Rows(0).Columns.Add(Me.RadGridView1.Columns("Phone")) view.ColumnGroups(1).Groups(1).Rows(0).Columns.Add(Me.RadGridView1.Columns("Fax")) RadGridView1.ViewDefinition = view Dim summaryItem As New GridViewSummaryItem() summaryItem.Name = "Address" summaryItem.Aggregate = GridAggregateFunction.Count Dim summaryRowItem As New GridViewSummaryRowItem() summaryRowItem.Add(summaryItem) Me.RadGridView1.SummaryRowsTop.Add(summaryRowItem) Me.RadGridView1.MasterView.SummaryRows(0).PinPosition = PinnedRowPosition.Top Me.RadGridView1.MasterView.SummaryRows(0).Height = 20 End Sub Workaround: use the ViewCellFormatting event and set the TextAlignment property to MiddleTop for the summary cells.
1. Load the ControlDefault theme in Visual Style Builder 2. Edit the cell style and try to disable the cell border when RadGridView is not focused and the HideSelection property is set to true. 3. You cannot because the HotTracking property is not updated correctly for grid cells. Workaround: void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e) { if (e.CellElement.IsCurrent && !e.CellElement.RowElement.HotTracking) { e.CellElement.DrawBorder = false; e.CellElement.DrawFill = false; } else { e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local); e.CellElement.ResetValue(LightVisualElement.DrawBorderProperty, ValueResetFlags.Local); } }
For now you can manually add the columns to the ExcelFilteredColumns collection when the filters are added in code: FilterDescriptor fd = new FilterDescriptor("Value", Telerik.WinControls.Data.FilterOperator.IsEqualTo, "B"); fd.IsFilterEditor = true; radGridView1.FilterDescriptors.Add(fd); this.radGridView1.MasterTemplate.ExcelFilteredColumns.Add( this.radGridView1.Columns[0] );
ADD. RadGridView - add export of ViewDefiniton 1. Add export functionality for ColumnGroupsViewDefinition 2. Add export functionality for HtmlViewDefinition
Currently each grid is exported in a separate excel file with one or more sheets. It will be good to add the possibility to export a grid to a separate sheet in an existing file.
Add the ability to print all levels of a hierarchical RadGridView.
When exporting to HTML or PDF image columns should be exported properly.
WORKAROUND: The format of the file that ExportToExcelML creates is ExcelML which is an extended XML. If you do not want to receive the message, you have to change the extension of the file to ".xml". Even though the file will have an xml extension, it will still be associated with MS Excel and will be opened by Excel.There is a possibility to turn this warning message off on the client machine. You can read more about that on the following blog post - Excel 2007 Extension Warning On Opening Excel Workbook from a Web Site (http://blogs.msdn.com/b/vsofficedeveloper/archive/2008/03/11/excel-2007-extension-warning.aspx) Another workaround is to use Interop to open the file and excel and save it in XLSX format. However, this would require Administrator or Power User (http://msdn.microsoft.com/en-us/library/ms173186%28v=vs.80%29.aspx). A reference from COM to the corresponding office version should be added. Here is the code for saving: ExportToExcelML exporter = new ExportToExcelML(this.radGridView1); exporter.ExportVisualSettings = true; string tempPath = Path.GetTempPath(); tempPath += "tempgrid.xls"; exporter.RunExport(tempPath); Microsoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.Application(); if (app == null) { Console.WriteLine("EXCEL could not be started. Check that your office installation and project references are correct."); return; } app.Visible = false; app.Interactive = false; Microsoft.Office.Interop.Excel.Workbook wb = app.Workbooks.Open(tempPath); string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); desktopPath += "\\grid.xlsx"; wb.SaveAs(desktopPath, Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookDefault); wb.Close(); app.Quit(); Marshal.ReleaseComObject(wb); Marshal.ReleaseComObject(app); File.Delete(tempPath);
Transfer the pinned status of grid's columns and rows to the exported excel file.
Add Page format functionality (like header, footer, page number) when you export a RadGridView to pdf similar to RadPrintDocument. http://www.telerik.com/help/winforms/tpf-printing-support-radprintdocument-header-and-footer.html
Currently all exported cells are static.
Currently it is not possible to insert custom worksheets (for example notes or a cover page) when exporting via ExportToExcelML
To reproduce: - add RadGridView with several columns and rows and export the grid to pdf file. - open the exported PDF file with Foxit Reader version 2.2. The opened file is blank.
Description: use RadGridView with a lot of columns (e.g. 50) that the horizontal scroll-bar appears. When exporting to PDF, the columns should be rendered correctly like in RadGridView Multi-Page printing.
To reproduce: - Bind the grid to a binding list of custom property which has a bool value. - Add a filter that shows only false values. - Change some (more than one) of the underlying values to true. - You will notice that the rows with the new value are still visible.
To reproduce: Add a RadGridView and fill it with data. Set the first column's IsVisible property to false. Right click over the row to Copy the row content and paste it in Excel. All data is in a single cell. The Clipboard content does not contain the corresponding <TABLE><TR> tags. Note: if the last columns is hidden, the line-breaks in the copied text are missing. Workaround: create custom RadGridView and replace the wrong content in the Clipboard: public class CustomGrid : RadGridView { protected override RadGridViewElement CreateGridViewElement() { return new CustomRadGridViewElement(); } } public class CustomRadGridViewElement : RadGridViewElement { protected override MasterGridViewTemplate CreateTemplate() { return new CustomMasterGridViewTemplate(); } } public class CustomMasterGridViewTemplate : MasterGridViewTemplate { public override void Copy() { base.Copy(); if (Clipboard.ContainsData(DataFormats.Html)) { string data = Clipboard.GetData(DataFormats.Html).ToString(); StringBuilder sb = new StringBuilder(data); if (!data.Contains("<TABLE>")) { int insertIndex = data.IndexOf("<TD>"); sb.Insert(insertIndex, "<TABLE><TR>"); } else if (!data.Contains("</TABLE>")) { int insertIndex = data.LastIndexOf("<TD>"); sb.Insert(insertIndex, "</TR></TABLE>"); } Clipboard.SetData(DataFormats.Html, sb.ToString()); } } }
The PDF exporting of RadGridView does not work correctly for Arabic text. The exported result revers the Arabic text.
RadGridView - does not scroll correctly when AutoSizeRows and EnableFastScrolling are set to true. Code to reproduce: radGridView1.BeginUpdate(); radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; radGridView1.AutoSizeRows = true; radGridView1.EnableFastScrolling = true; DataTable dt = new DataTable(); dt.Columns.Add("A"); dt.Columns.Add("B"); dt.Columns.Add("C"); for (int i = 0; i < 50; i++) { string[] array = new string[3]; array[0] = i.ToString(); array[1] = i.ToString(); array[2] = i.ToString(); dt.Rows.Add(array); } radGridView1.DataSource = dt; radGridView1.EndUpdate();