Currently the mixed hierarchy mode does not work for child templates
IMPROVE. Extend the functionality of formatting the group text when grouping by more than one column is performed on the same group level
When you are using drop down list in RadGridView in suggest-append mode, you should be allowed to add non-existing item to the data source.
To reproduce: 1. Run the attached sample project. 2. Move the form to the right bottom of the screen. 3. Hover a cell to show the tool tip. It will start blinking. Please refer to the attached gif file. Workaround: use screen tips: http://docs.telerik.com/devtools/winforms/telerik-presentation-framework/tooltips-and-screentips/screen-tips
To reproduce: 1. Add a RadGridView with a GridViewCheckBoxColumn and enable the paging functionality for it. 2. Toggle the header checkbox on the first page. Only the rows from the page are toggled. Workaround: you can subscribe to the HeaderCellToggleStateChanged event and toggle all rows: private void radGridView1_MouseUp(object sender, MouseEventArgs e) { if (this.radGridView1.Tag+""=="toggle") { this.radGridView1.Tag = null; this.radGridView1.HeaderCellToggleStateChanged -= radGridView1_HeaderCellToggleStateChanged; } } private void radGridView1_MouseDown(object sender, MouseEventArgs e) { RadCheckBoxElement element = this.radGridView1.ElementTree.GetElementAtPoint(e.Location) as RadCheckBoxElement; if (element != null && element.Parent is GridCheckBoxHeaderCellElement) { this.radGridView1.Tag = "toggle"; this.radGridView1.HeaderCellToggleStateChanged += radGridView1_HeaderCellToggleStateChanged; } } private void radGridView1_HeaderCellToggleStateChanged(object sender, GridViewHeaderCellEventArgs e) { this.radGridView1.BeginUpdate(); foreach (GridViewRowInfo row in this.radGridView1.Rows) { row.Cells["Discontinued"].Value = e.State; } this.radGridView1.EndUpdate(); }
To reproduce: run the attached sample project and group by the Id column. Workaround: use the ViewCellFormatting event to populate the missing values or use a custom GridViewSummaryItem and override the Evaluate method in order to achieve the desired calculation.
Use the attached project to reproduce. - Start the project and group by any column and export the grid. - The same code works finme if the document is imported. Workaround: Edit the document after it is exported: var provider = new XlsxFormatProvider(); var workbook = new Workbook(); using (var stream = File.OpenRead(@"D:\123.xlsx")) { workbook = provider.Import(stream); } PatternFill solidPatternFill = new PatternFill(PatternType.Solid, System.Windows.Media.Color.FromRgb(46, 204, 113), Colors.Transparent); CellValueFormat textFormat = new CellValueFormat("@"); Worksheet sheet = workbook.ActiveWorksheet; CellRange range = new CellRange(0, 0, 1, 4); CellSelection header = sheet.Cells[range]; if (header.CanInsertOrRemove(range, ShiftType.Down)) { header.Insert(InsertShiftType.Down); } header.Merge(); header.SetFormat(textFormat); header.SetFontFamily(new ThemableFontFamily("Rockwell")); header.SetFontSize(24); header.SetHorizontalAlignment(Telerik.Windows.Documents.Spreadsheet.Model.RadHorizontalAlignment.Center); header.SetVerticalAlignment(Telerik.Windows.Documents.Spreadsheet.Model.RadVerticalAlignment.Center); header.SetFill(solidPatternFill); header.SetValue("Test"); using (var stream = File.OpenWrite("result.xlsx")) { provider.Export(workbook, stream); } Process.Start("result.xlsx");
To reproduce: please refer to the attached sample project and gif file illustrating the behavior. Add cell value in the new row and press teh down arrow. Workaround: this.radGridView1.MasterTemplate.SelectLastAddedRow = false; This problem is applicable for OpenEdge as well: http://knowledgebase.progress.com/articles/Article/Telerik-RadGridView-highlights-unnecessary-columns-and-rows-in-batch-mode
To reproduce: - Create ColumnGroupsViewDefinition and export it with the following code: SpreadExportRenderer renderer = new SpreadExportRenderer(); GridViewSpreadExport spreadExporter = new GridViewSpreadExport(radGridView1); spreadExporter.FreezeHeaderRow = true; spreadExporter.ExportViewDefinition = true; spreadExporter.ExportVisualSettings = true; spreadExporter.ExportGroupedColumns = true; spreadExporter.ExportHierarchy = true; spreadExporter.SheetMaxRows = ExcelMaxRows._1048576; spreadExporter.ExportFormat = SpreadExportFormat.Xlsx; spreadExporter.FileExportMode = FileExportMode.CreateOrOverrideFile; spreadExporter.RunExport(dialog.FileName, renderer); Workaround: - Set FreezeHeaderRow to false. You can manually freeze the rows as well: private void Renderer_WorkbookCreated(object sender, WorkbookCreatedEventArgs e) { e.Workbook.ActiveWorksheet.ViewState.FreezePanes(2, 0); }
To reproduce: please refer to the attached gif file. Workaround: public RadForm1() { InitializeComponent(); this.radGridView1.CellClick+=radGridView1_CellClick; } private void radGridView1_CellClick(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e) { if (e.Column is Telerik.WinControls.UI.GridViewRowHeaderColumn) { this.radGridView1.CloseEditor(); } }
To reproduce - Start the attached project press "Add in code" then "Save" - The row is still not added to the underlying data table. Workaround: TryCast(Me.radGridView1.Rows.Last().DataBoundItem, IEditableObject).EndEdit()
To reproduce: Please refer to the attached gif file and follow the steps DataTable dt = new DataTable(); dt.Columns.Add("Id", typeof(int)); dt.Columns.Add("ParentId", typeof(int)); dt.Columns.Add("Date", typeof(DateTime)); Random rand = new Random(); for (int i = 0; i < 5; i++) { dt.Rows.Add(i, -1, DateTime.Now); } for (int j = 5; j < 10; j++) { dt.Rows.Add(j, rand.Next(0, 5), DateTime.Now.AddDays(j)); } this.radGridView1.Relations.AddSelfReference(this.radGridView1.MasterTemplate, "Id", "ParentId"); this.radGridView1.DataSource = dt; this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; GridViewDateTimeColumn dateTimeColumn = this.radGridView1.Columns.Last() as GridViewDateTimeColumn; dateTimeColumn.FilteringMode = GridViewTimeFilteringMode.Date; this.radGridView1.EnableFiltering = true; Workaround: use the standard hierarchy: http://docs.telerik.com/devtools/winforms/gridview/hierarchical-grid/binding-to-hierarchical-data-programmatically OR the custom filtering: http://docs.telerik.com/devtools/winforms/gridview/filtering/custom-filtering
To reproduce: please refer to the attached sample project. Click the button several times to add 3-4000 rows and toggle the checkbox. You will notice that every time you add new rows and hide the column it takes a long time. The more rows you have, the more time it requires. Workaround: radGridView1.MasterTemplate.BeginUpdate(); radGridView1.Columns[0].IsVisible = checkBox1.Checked; radGridView1.MasterTemplate.EndUpdate();
To reproduce: - Add a grid to a PageView and add the pageView to a dock window at run time. - The grid should not be visible. - Set your DPI setting to 150% Workaround: class MyViewDefinition : TableViewDefinition { public override IRowView CreateViewUIElement(GridViewInfo viewInfo) { return new MyTableElement(); } } class MyTableElement : GridTableElement { public override void DpiScaleChanged(SizeF scaleFactor) { if (this.ViewTemplate != null) { base.DpiScaleChanged(scaleFactor); } } protected override Type ThemeEffectiveType { get { return typeof(GridTableElement); } } } //use the above definition like this: radGridView1.ViewDefinition = new MyViewDefinition();
To reproduce: 1. Bind RadGridView to the Northwind.Customers table. 2. Activate the editor for some of the cells from the CustomerID column. 3. Enter "ALFKI" which already exists. The DataError event is supposed to be fired in this case. If you set the GridViewDataErrorEventArgs.ThrowException argument to true the exception is supposed to be thrown. However, nothing happens. Please refer to the attached sample project.
Workaround: Friend Class MyRadGridView Inherits RadGridView Public Overrides Property ThemeClassName As String Get Return GetType(RadGridView).FullName End Get Set(value As String) MyBase.ThemeClassName = value End Set End Property Protected Overrides Function CreateGridViewElement() As RadGridViewElement Return New MyRadGridViewElement() End Function End Class Friend Class MyRadGridViewElement Inherits RadGridViewElement Protected Overrides ReadOnly Property ThemeEffectiveType() As Type Get Return GetType(RadGridViewElement) End Get End Property Protected Overrides Function CreateGroupPanelElement() As GroupPanelElement Return New MyGroupPanelElement() End Function End Class Friend Class MyGroupPanelElement Inherits GroupPanelElement Protected Overrides ReadOnly Property ThemeEffectiveType() As Type Get Return GetType(GroupPanelElement) End Get End Property Protected Overrides Function ArrangeOverride(finalSize As SizeF) As SizeF Dim clientRect As RectangleF = Me.GetClientRectangle(finalSize) Dim sizeGripRect As New RectangleF(clientRect.X, clientRect.Bottom - Me.SizeGrip.DesiredSize.Height, clientRect.Width, Me.SizeGrip.DesiredSize.Height) Me.SizeGrip.Arrange(sizeGripRect) clientRect.Height -= Me.SizeGrip.DesiredSize.Height Dim groupHeaderRect As New RectangleF(clientRect.X, clientRect.Y, Me.Header.DesiredSize.Width, clientRect.Height) Me.Header.Arrange(groupHeaderRect) clientRect.Width -= Me.Header.DesiredSize.Width Dim scrollViewRect As New RectangleF(clientRect.X + Me.Header.DesiredSize.Width, clientRect.Y, clientRect.Width, clientRect.Height) If scrollViewRect.Width > 20 Then Me.ScrollView.Arrange(scrollViewRect) End If Return finalSize End Function End Class
How to reproduce: check the attached video Workaround: disable pinning of the last row when it is in a group public partial class Form1 : Form { DataTable dt; public Form1() { InitializeComponent(); this.radGridView1.DataSource = this.GetData(); this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; this.radGridView1.ContextMenuOpening += RadGridView1_ContextMenuOpening; } private void RadGridView1_ContextMenuOpening(object sender, Telerik.WinControls.UI.ContextMenuOpeningEventArgs e) { GridRowHeaderCellElement header = e.ContextMenuProvider as GridRowHeaderCellElement; if (header != null && header.RowInfo.Group != null) { var notPinned = header.RowInfo.Group.GroupRow.ChildRows.Where(r => r.IsPinned == false).ToList(); if (notPinned.Count <= 1) { e.ContextMenu.Items.RemoveAt(0); e.ContextMenu.Items.RemoveAt(0); } } } private DataTable GetData() { dt = new DataTable(); dt.Columns.Add("Id", typeof(int)); dt.Columns.Add("Name", typeof(string)); dt.Columns.Add("Date", typeof(DateTime)); dt.Columns.Add("Bool", typeof(bool)); for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { dt.Rows.Add(i, "Name " + i + " " + j, DateTime.Now.AddDays(i), i % 2 == 0); } } return dt; } }
Workaround: AddHandler Me.RadGridView1.CreateCompositeFilterDialog, AddressOf CreateCompositeFilterDialog Private Sub CreateCompositeFilterDialog(sender As Object, e As GridViewCreateCompositeFilterDialogEventArgs) Dim dialog As New CompositeDataFilterForm() AddHandler dialog.DataFilter.EditorRequired, AddressOf EditorRequired e.Dialog = dialog End Sub Private Sub EditorRequired(sender As Object, e As TreeNodeEditorRequiredEventArgs) Dim filterNode As DataFilterCriteriaNode = TryCast(e.Node, DataFilterCriteriaNode) If filterNode IsNot Nothing AndAlso filterNode.PropertyName = "BASE_NULL_DATE" AndAlso TypeOf sender Is DataFilterValueEditorElement Then e.Editor = New TreeViewDateTimeEditor() End If End Sub