To reproduce: For i = 0 To Me.RadGridView1.Columns.Count - 1 Me.RadGridView1.Columns(i).AutoSizeMode = Telerik.WinControls.UI.BestFitColumnMode.HeaderCells
Workaround: set the data type of the column to null before saving the layout and after loading it set it with the needed type
ADD. RadGridView - add the ability to group by a certain column and display the groups sorted by the values of another column
The GroupRow Height cannot be changed when ColumnGroupsViewDefinition and HtmlViewDefinition are used.
Currently sub-property binding is supported in the MasterTemplate of the grid (level 1). We should make this functionality available in lower levels when users are creating an object relational hierarchy.
The column image setting overrides the local image setting. Work around: void grid_CellFormatting(object sender, CellFormattingEventArgs e) { if (e.CellElement is GridCommandCellElement) { if (e.Column.Name == "stationview") { RadButtonElement element = (RadButtonElement)e.CellElement.Children[0]; element.UnbindProperty(RadButtonElement.ImageProperty); element.Image = img; element.DisplayStyle = DisplayStyle.Image; element.ImageAlignment = ContentAlignment.MiddleCenter; } } }
To reproduce, use the following localization provider and set a fitler to a boolean column in RadGridView, via the Custom filtering dialog. class MyRadGridLocalizationProvider : RadGridLocalizationProvider { public const string CustomTrue = "CustomTRUE"; public const string CustomFalse = "CustomFALSE"; public override string GetLocalizedString(string id) { if (id == "CustomFilterDialogTrue") { return CustomTrue; } else if (id == "CustomFilterDialogFalse") { return CustomFalse; } else { return base.GetLocalizedString(id); } } } Workaround - create custom type converter as follows: public class MyBooleanConverter : BooleanConverter { public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) { if (value is string) { string text = Convert.ToString(value); if (text == MyRadGridLocalizationProvider.CustomTrue) { return true; } else if (text == MyRadGridLocalizationProvider.CustomFalse) { return false; } } return base.ConvertFrom(context, culture, value); } } and apply it to the check box column: radGridView1.Columns["BoolColumn"].DataTypeConverter = new MyBooleanConverter();
After a couple clicks, grid's context menu becomes unresponsive when using RadGridView through remote connection and Windows 7
Add support for the GridViewComboBoxColumn to initialize properly when the BindingList it is bound to is empty.
How to reproduce: Create a DPI-aware application and run it on a Windows 10 machine on 125%, the text inside the editors is smaller compared to the text in cells which are not in edit mode. Workaround: private void RadGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e) { BaseInputEditor editor = e.ActiveEditor as BaseInputEditor; if (editor != null) { RadTextBoxItem item = editor.EditorElement.FindDescendant<RadTextBoxItem>(); if (item != null) { item.HostedControl.Font = this.radGridView1.GridViewElement.GetScaledFont(this.radGridView1.GridViewElement.DpiScaleFactor.Height); } } }
The row's MaxHeight property does not affect the row sizing when the AutoSizeRows property of RadGridView is enabled. Workaround: Use the following data row: public class MyGridDataRowElement : GridDataRowElement { protected override Type ThemeEffectiveType { get { return typeof(GridDataRowElement); } } protected override System.Drawing.SizeF MeasureCore(System.Drawing.SizeF availableSize) { float maxHeight = this.RowInfo.MaxHeight; bool isAutoSize = this.GridViewElement.AutoSize && this.RowInfo.MaxHeight > 0 && availableSize.Height == float.PositiveInfinity; SizeF size = base.MeasureCore(availableSize); if (isAutoSize && size.Height > maxHeight) { availableSize.Height = maxHeight; size = base.MeasureCore(availableSize); } return size; } } here is how to replace it and set the max height: void radGridView1_RowFormatting(object sender, RowFormattingEventArgs e) { e.RowElement.RowInfo.MaxHeight = 32; } void radGridView1_CreateRow(object sender, GridViewCreateRowEventArgs e) { if (e.RowType == typeof(GridDataRowElement)) { e.RowType = typeof(MyGridDataRowElement); } }
To reproduce: 1. Add a RadGridView with two GridViewMultiComboBoxColumns at design time. 2. Bind both of the columns at design time to two different data sources. 3. In the CellEditorInitialized event, set the RadMultiColumnComboBoxElement.AutoSizeDropDownToBestFit property to true. 4. Run the application and open the editor for one of the GridViewMultiComboBoxColumns . You will notice that the columns are automatically sized to fit the content. However, if you open the editor for the other GridViewMultiComboBoxColumn, you will see that columns are not auto sized correctly. Please refer to the attached gif file. Workaround: private void radGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e) { RadMultiColumnComboBoxElement mccbEditor = e.ActiveEditor as RadMultiColumnComboBoxElement; if (mccbEditor != null) { mccbEditor.AutoSizeDropDownToBestFit = true; mccbEditor.PopupOpening -= mccbEditor_PopupOpening; mccbEditor.PopupOpening += mccbEditor_PopupOpening; } } private void mccbEditor_PopupOpening(object sender, CancelEventArgs e) { RadMultiColumnComboBoxElement mccbEditor = sender as RadMultiColumnComboBoxElement; if (mccbEditor != null) { mccbEditor.EditorControl.BestFitColumns(BestFitColumnMode.AllCells); int width = 0; foreach (GridViewColumn c in mccbEditor.EditorControl.Columns) { width += c.Width; } width += mccbEditor.EditorControl.TableElement.VScrollBar.Size.Width; mccbEditor.MultiColumnPopupForm.Size = new Size(width, mccbEditor.MultiColumnPopupForm.Size.Height); } }
To reproduce set AddNewRowPosition is Bottom and the NewRowEnterKeyMode is EnterMovesToNextCell and add a new row via na UI Workaround: void radGridView1_RowsChanged(object sender, GridViewCollectionChangedEventArgs e) { if (e.Action == NotifyCollectionChangedAction.Add && radGridView1.CurrentRow is GridViewNewRowInfo) { } }
If you set the MinWidth and MaxWidth to a column and then set AutoSizeColumnMode to Fill (all this in the form constructor) a gap will appear between the columns. Workaround: set the Fill before the MinWidth and MaxWidth and to do all these operations on Load.
The performance of excel-like filtering when you have more than 5000+ row in RadGridView.
ADD. RadGridView should support filtering operations when custom TypeConverters are used.
Steps to reproduce: 1. Use the RadGridView Smart Tag to set its data source 2. Press "Add Project DataSource" 3. Select "Object" 4. Drill down and select the class you created. (see below) 5. Select the New Data Source 6. Run the project Code to reproduce: public class TestClass { public enum Month { January, Febuary, March, April, May, June, July, August, September, October, November, December } public Month TestMonth {get; set;} public String TestMessage {get; set;} public TestClass(Month month, String message) { TestMonth = month; TestMessage = message; } } Workaround: Use BindingList instead System.Windows.Forms.BindingSource.
IMPROVE. RadGridView - add ability to change and customize the font (bold, italic, etc) in the ConditionalFormattingForm
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: please refer to the attached sample project and follow the steps from the attached gif file. 1. Run the project and type "hana" in the second filter cell. You will notice that after a few seconds the input is handled and the grid is filtered. Workaround: use RadVirtualGrid instead. https://docs.telerik.com/devtools/winforms/virtualgrid/overview https://docs.telerik.com/devtools/winforms/virtualgrid/filtering/filtering Second workaround: https://docs.telerik.com/devtools/winforms/gridview/filtering/how-to/filter-on-enter