To reproduce: Create a form and add a timer with interval of 1 second and in tick handler do the following: void t_Tick(object sender, EventArgs e) { if (this.Controls.Count > 0) { Control oldGrid = this.Controls[0]; this.Controls.RemoveAt(0); oldGrid.Dispose(); GC.Collect(3, GCCollectionMode.Forced); } RadGridView grid = new RadGridView(); grid.Dock = DockStyle.Fill; this.Controls.Add(grid); } You will see that the memory consumption will grow. Workaround: Use the following custom RadGridView public class MyRadGridView : RadGridView { protected override RadGridViewElement CreateGridViewElement() { return new MyElement(); } } public class MyElement : RadGridViewElement { protected override PagingPanelElement CreatePagingPanelElement() { return new MyPagingPanel(); } protected override Type ThemeEffectiveType { get { return typeof(RadGridViewElement); } } } public class MyPagingPanel : PagingPanelElement { protected override void CreateButtonsStripElementChildElements() { base.CreateButtonsStripElementChildElements(); this.ButtonsStripElement.Children.Add(this.ButtonsStripElement.Grip); this.ButtonsStripElement.Children.Add(this.ButtonsStripElement.OverflowButton); this.ButtonsStripElement.Grip.Visibility = this.ButtonsStripElement.OverflowButton.Visibility = ElementVisibility.Collapsed; } protected override void CreateTextBoxStripElementChildElements() { base.CreateTextBoxStripElementChildElements(); this.TextBoxStripElement.Children.Add(this.TextBoxStripElement.Grip); this.TextBoxStripElement.Children.Add(this.TextBoxStripElement.OverflowButton); this.TextBoxStripElement.Grip.Visibility = this.TextBoxStripElement.OverflowButton.Visibility = ElementVisibility.Collapsed; } }
Workaround: void radGridView1_PrintCellFormatting(object sender, PrintCellFormattingEventArgs e) { if (e.Column is GridViewImageColumn && e.Row is GridViewDataRowInfo) { e.PrintCell.DrawFill = true; if (radGridView1.PrintStyle.PrintAlternatingRowColor && e.Row.Index % 2 == 1) { e.PrintCell.BackColor = radGridView1.PrintStyle.AlternatingRowColor; } else { e.PrintCell.BackColor = radGridView1.PrintStyle.CellBackColor; } } }
To reproduce: -Add GridViewMaskBoxColumn to a grid. -Set the Mask type to Regex and set any mask you want. -When you leave the cell NullRefernceException is thrown.
To reproduce: - Add GridViewComboBoxColumn to a grid. - Set the DisplayMemeber property like this: column1.DisplayMember = "AddInfo.Status";
DECLINED: this happens only when the double click is outside the bounds of the scroll button which is the expected behavior. To reproduce: When the user clicks too fast on the quite thin area between the grid's scroll-bar arrow button and the row, it fires the CurrentRowChanging event. Workaround: private bool cancelChanging = false; private void radGridView1_CurrentRowChanging(object sender, CurrentRowChangingEventArgs e) { if (cancelChanging) { e.Cancel = true; cancelChanging = false; } } private void radGridView1_MouseDoubleClick(object sender, MouseEventArgs e) { cancelChanging = false; RadElement element = this.radGridView1.Behavior.GetHoveredRadElement(); while (element != null) { if (element.GetType() == typeof(RadScrollBarElement)) { cancelChanging = true; break; } element = element.Parent; } }
Setting the DataSource is slower (about 1/3 times more) when ShowColumnHeaders is set to true. Workaround: Set the ShowColumnHeaders to false, then set the DataSource and restore the ShowColumnHeaders state: radGridView1.ShowColumnHeaders = false; radGridView1.DataSource = mySource; radGridView1.ShowColumnHeaders = true;
This issue appears when one clears the relations collection of RadGridView, it appears sporadically and in rare cases
Extend the cell elements with a button(s) (via decorator for example) which will be visible without putting the grid in edit mode. The buttons should not be visible by default and their visibility will be controlled via property of the column. These buttons can be RadButtonElements which will not hurt the performance. Their purpose will be to inform the end user that some cell is a combo or a date time cell without having to open its editor in advance. When the button is clicked, the corresponding action should be executed e.g. for combo cell, open the editor and show the popup; for spin cell open the editor and perform the click of the desired button. Same goes for the rest of the editors - mccb, color, browse, date time, etc.
Workaround: Me.RadGridView1.Columns("ProductName").TextAlignment = ContentAlignment.MiddleRight
FIX. RadGridView - cannot show tooltips in GridViewComboBoxColumn, while in RadDropDownList the tooltips work correctly
If you dispose the grid or the form it is placed on the grid's DoubleClick, MouseDoubleClick, MouseDown, etc. events, an exception is thrown.
To reproduce: - Add RadGridView to a blank project and bind it to a blank binding source. - Add GridViewMultiComboBoxColumn to the grid and bind it to another binding source. - In the CellEditorInitialized set the autocomplete mode to Suggest. - When you start the application you will notice that the first items is selected but not displayed and to display it you should select other value first and you will be able to select the first one. Workaround: Set the selected item of the editor to null in the CellEditorInitialized event.
Steps to reproduce: 1. Add a RadGridView with one column and one row to a form 2. Set the value of the only data cell in the grid to a string containing more than 32 'a' characters 3. Type 'a' in the search row. You will see an OverflowException
To reproduce: DataTable t = new DataTable(); t.Columns.Add("timeSpan", typeof(TimeSpan)); t.Rows.Add(TimeSpan.FromHours(11)); t.Rows.Add(TimeSpan.FromHours(2)); t.Rows.Add(TimeSpan.FromHours(4)); t.Rows.Add(TimeSpan.FromMinutes(17)); radGridView1.DataSource = t; GridViewSummaryItem summaryItem = new GridViewSummaryItem(); summaryItem.Name = "timeSpan"; summaryItem.Aggregate = GridAggregateFunction.Sum; GridViewSummaryRowItem summaryRowItem = new GridViewSummaryRowItem(); summaryRowItem.Add(summaryItem); this.radGridView1.SummaryRowsTop.Add(summaryRowItem); Workaround: CustomSummaryItem summaryItem = new CustomSummaryItem("timeSpan", "", GridAggregateFunction.Sum); GridViewSummaryRowItem summaryRowItem = new GridViewSummaryRowItem(); summaryRowItem.Add(summaryItem); this.radGridView1.SummaryRowsTop.Add(summaryRowItem); public class CustomSummaryItem : GridViewSummaryItem { public CustomSummaryItem(string name, string formatString, GridAggregateFunction aggregate) : base(name, formatString, aggregate) { } public override object Evaluate(IHierarchicalRow row) { TimeSpan timeSpanSum = new TimeSpan(); foreach (GridViewRowInfo childRow in row.ChildRows) { timeSpanSum += (TimeSpan)childRow.Cells["timeSpan"].Value; } return timeSpanSum; } }
Use the following code snippet: public Form1() { InitializeComponent(); GridViewDecimalColumn decimalColumn = new GridViewDecimalColumn("Id"); radGridView1.MasterTemplate.Columns.Add(decimalColumn); GridViewTextBoxColumn textBoxColumn = new GridViewTextBoxColumn("Name"); radGridView1.MasterTemplate.Columns.Add(textBoxColumn); GridViewDateTimeColumn dateTimeColumn = new GridViewDateTimeColumn("CreatedOn"); radGridView1.MasterTemplate.Columns.Add(dateTimeColumn); radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; for (int i = 0; i < 10; i++) { radGridView1.Rows.Add(i, "Name" + i, DateTime.Now.AddDays(i)); } radGridView1.ClipboardPasteMode = GridViewClipboardPasteMode.Disable; } If you copy a cell content and try to paste it to another cell of the same column, the content is pasted successfully, although the ClipboardPasteMode property is set to Disable.
The check box should be placed in the header cell (if the users wants to). Additionally it should be able to control both one level and hierarchy Resolution: You need to set the EnableHeaderCheckBox property to true. Please refer in help article for more information: http://www.telerik.com/help/winforms/gridview-columns-gridviewcheckboxcolumn.html
To reproduce: - Add the following column to a blank grid and new row or edit the existing one: GridViewMaskBoxColumn maskBoxColumn = new GridViewMaskBoxColumn(); maskBoxColumn.Name = "Dates"; maskBoxColumn.HeaderText = "Dates"; maskBoxColumn.MaskType = MaskType.FreeFormDateTime; maskBoxColumn.DataType = typeof(System.DateTime); radGridView1.MasterTemplate.Columns.Add(maskBoxColumn); this.radGridView1.Rows.Add(DateTime.Now.AddDays(5));
Sort capabilities in column chooser form.
The Column Chooser of RadGridView should show the invisible columns sorted.