To reproduce: please refer to the attached gif file and sample project Workaround: set the AutoSizeRows property to false
To reproduce: - Add 7-8 columns to the grid. - Set the AutoSizeColumnsMode to Fill - Set the MaxWidth/MaxWidth of the last two columns. - Resize the first column. - Sometimes the size of the other columns is randomly increased/decreased.
To reproduce: we have a RadPageView with two grids on two pages. The first grid has a ColumnGroupsViewDefinition applied. When you open the Property Builder and try to hide some of the columns, the error occurs. Workaround: make the changes programamtically at run time.
By default, when I am expanding a group and start sorting, the expanded group doesn't collapse. However, if you use a group comparer, all groups will always collapse, when you click a header cell to sort.
It appears that this scenario is not handled properly in our exporter. Consider the case where you have two templates that use view definition. The view definition from the second template is not exported at all.
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.
To reproduce: please refer to the attached gif file. 1. Run the attached sample project. 2. Toggle the checkbox and scroll to a specific row. 3. Click the button to hide a column. You will notice that the vertical scrollbar changes its position. If the AutoSizeRows property is set to false, the scrollbar keeps its position. Workaround: private void radToggleButton1_ToggleStateChanged(object sender, Telerik.WinControls.UI.StateChangedEventArgs args) { int scrollBarValue = this.radGridView1.TableElement.VScrollBar.Value; bool visible = true; if (args.ToggleState == Telerik.WinControls.Enumerations.ToggleState.On) { visible = false; } this.radGridView1.MasterTemplate.BeginUpdate(); for (int i = 1; i < this.radGridView1.Columns.Count; i += 2) { this.radGridView1.Columns[i].IsVisible = visible; } this.radGridView1.MasterTemplate.EndUpdate(); this.radGridView1.TableElement.VScrollBar.Value = scrollBarValue; }
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");
When I add summary rows to my radgridview. something strange is happening. I demonstrate it to you in two pictures. please take a look at attachments
Until released one can format the nodes this way: private void RadGridView1_FilterPopupRequired(object sender, Telerik.WinControls.UI.FilterPopupRequiredEventArgs e) { if (e.Column.GetType().Name == "GridViewDateTimeColumn") { RadListFilterPopup popup = new RadListFilterPopup(e.Column, true); e.FilterPopup = popup; popup.MenuTreeElement.TreeView.NodeFormatting += TreeView_NodeFormatting; } } int monthNumber = -1; private void TreeView_NodeFormatting(object sender, TreeNodeFormattingEventArgs e) { if (e.Node.Level == 2) { if (int.TryParse(e.Node.Text, out monthNumber)) { e.NodeElement.ContentElement.Text = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(monthNumber); } } }
Please refer to the attached sample project and follow the steps in the gif file. 1. Open two MDI child forms. 2. Activate the first form and right click on the grid in order to show the context menu and add a shortcut to the menu item. Press Ctrl+N in order to add some new rows to the first grid. 3. Activate the second form and right click on the grid in order to show the context menu and add a shortcut to the menu item. Press Ctrl+N in order to add some new rows to the second grid. However, you will notice that the first several shortcuts combinations are executed for the first grid and then for the active second grid. Workaround: clear the shortcut when the form is deactivated: this.Deactivate += GridForm_Deactivate; private void GridForm_Deactivate(object sender, EventArgs e) { item.Shortcuts.Clear(); } private void GridForm_Activated(object sender, EventArgs e) { this.ActiveControl = this.radGridView1; } RadMenuItem item = new RadMenuItem(); private void radGridView1_ContextMenuOpening(object sender, Telerik.WinControls.UI.ContextMenuOpeningEventArgs e) { item.Text = "insert row"; item.Shortcuts.Add(new RadShortcut(Keys.Control, Keys.N)); item.Click += item_Click; e.ContextMenu.Items.Add(item); }
Steps to reproduce: 1. Add RadGridView and populate with data 2. Show the context menu many times. Sometimes the popup is not shown correctly. If you click again, the popup is visible correctly. Workaround: Set the AnimationEnabled property to false or the AnimationType property to None. Here is the code snippet how can be achieve it: //Set the AnimationEnabled to false void radGridView1_ContextMenuOpening(object sender, Telerik.WinControls.UI.ContextMenuOpeningEventArgs e) { RadDropDownMenu contextMenu = e.ContextMenu as RadDropDownMenu; contextMenu.AnimationEnabled = false; } //Set the AnimationType to None void radGridView1_ContextMenuOpening(object sender, Telerik.WinControls.UI.ContextMenuOpeningEventArgs e) { RadDropDownMenu contextMenu = e.ContextMenu as RadDropDownMenu; contextMenu.AnimationType = PopupAnimationTypes.None; }
To reproduce: please refer to the attached sample project and follow the described steps in the .doc file located in the zip. Workaround: protected override void OnActivated(EventArgs e) { base.OnActivated(e); this.ActiveControl = this.gvDetails; } private void gvDetails_LostFocus(object sender, EventArgs e) { ((ComponentBehavior)gvDetails.Behavior).GetType().GetProperties(BindingFlags.NonPublic | BindingFlags.Instance); PropertyInfo barProperty = ((ComponentBehavior)gvDetails.Behavior).GetType().GetProperty("ScreenPresenter", BindingFlags.NonPublic | BindingFlags.Instance); Form screenTip = barProperty.GetValue(((ComponentBehavior)gvDetails.Behavior), null) as Form; screenTip.Hide(); }
To reproduce: please refer to the attached sample project. Note that the CellValidating event is fired twice even without showing a RadMessageBox. With an MS Button the problem is not reproducible. Workaround: use the RadGridView.ValueChanging event to perform validation while the user is typing in the active editor: private void radGridView1_ValueChanging(object sender, Telerik.WinControls.UI.ValueChangingEventArgs e) { if (((string)e.NewValue) != "x") { RadMessageBox.Show("Only 'x' allowed!"); e.Cancel = true; } }
To reproduce: please refer to the attached sample project and gif file. Workaround: use the CellFormatting event and apply the light orange BackColor for the selected cells belonging to the current pinned column: private void radGridView1_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e) { if (e.Row.IsSelected && e.Column.IsCurrent) { e.CellElement.BackColor = Color.FromArgb(255, 231, 174); } else { e.CellElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local); } }