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); } }
1. Create new project with RadGridView and setup hierarchy with multiple tabs. 2. Run the project. 3. Open a child view tab and start editing a filter cell. 4. While the editor is open, change the active tab. 5. Repeat this operation several times. Workaround: the issue appears because RadGridView does not close its editor when changing the tab page and it thinks that it is still in edit mode when selecting the old page. You can work around the issue by using a custom cell element. Consider the code below: public class CustomDetailsCellElement : GridDetailViewCellElement { public CustomDetailsCellElement(GridViewColumn column, GridRowElement row) : base(column, row) { } protected override Type ThemeEffectiveType { get { return typeof(GridDetailViewCellElement); } } protected override RadPageViewElement CreatePageViewElement(IRadPageViewProvider pageViewProvider) { RadPageViewElement pageView = base.CreatePageViewElement(pageViewProvider); pageView.ItemSelecting += new EventHandler<RadPageViewItemSelectingEventArgs>(PageViewElement_ItemSelecting); return pageView; } void PageViewElement_ItemSelecting(object sender, RadPageViewItemSelectingEventArgs e) { if (this.IsInValidState(true) && this.GridControl != null && this.GridControl.IsInEditMode) { this.GridControl.EndEdit(); } } } You should handle also the CreateCell event in order to replace default child view cell in RadGridView: void gvReviewMigration_CreateCell(object sender, GridViewCreateCellEventArgs e) { if (e.CellType == typeof(GridDetailViewCellElement)) { e.CellType = typeof(CustomDetailsCellElement); } }
Currently csv files are exported with UTF-8 encoding. There should be an option allowing users to change it.
The PDF exporting of RadGridView does not work correctly for Arabic text. The exported result revers the Arabic text.
Filtering is applied, if you clear the filter descriptors and enable/disable custom filtering. Steps to reproduce: 1. Click on the filter button on the Name header. Check only one name, and only one record should be visible in the grid. 2. Click the Clear button. All records should now be visible. 3. Click the Toggle Filter button once, to enable custom filtering. 4. Click the Toggle Filter button again to disable custom filtering. Workaround: private static readonly FieldInfo FilterContextFieldInfo = typeof(RadCollectionView<GridViewRowInfo>).GetField("filterContext", BindingFlags.NonPublic | BindingFlags.Instance); this.radGridView1.FilterDescriptors.Clear(); StringCollection filterContext = FilterContextFieldInfo.GetValue(this.radGridView1.MasterTemplate.DataView) as StringCollection; filterContext.Clear();
Steps to reproduce: 1. Add a RadGridView to a form 2. Add several columns and set their MinWidth to 0 3. Set the grid AutoSizeColumnsMode property to Fill 4. Run the project and you will see that you cannot resize the columns. WORKAROUND: Set the MinWidth property to a value greater than 0
The issue is reproduced when the columns for GridViewTemplate are added last in the end after the all hierarchy settings: relations, templates
To reproduce: GridViewMaskBoxColumn maskBoxColumn = new GridViewMaskBoxColumn(); maskBoxColumn.Name = "MaskEditBoxColumn"; maskBoxColumn.HeaderText = "MaskEditBoxColumn"; maskBoxColumn.MaxLength = 5; maskBoxColumn.MaskType = MaskType.Numeric; maskBoxColumn.Mask = "C"; maskBoxColumn.FormatString = "{0:C}"; radGridView1.MasterTemplate.Columns.Add(maskBoxColumn); WORKAROUND: void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e) { GridSpinEditor editor = e.ActiveEditor as GridSpinEditor; if (editor != null) { GridSpinEditorElement element = (GridSpinEditorElement)editor.EditorElement; element.TextChanging += element_TextChanging; } } void element_TextChanging(object sender, TextChangingEventArgs e) { e.Cancel = e.NewValue.Length > 5; } Comment : Removed the MaxLength property from GridViewMaskBoxColumn. You should use the Mask property and set an appropriate mask value. For example the #### mask allows entering only 4 digits.
The RadGridView throws unhandled exception, when you try to close the custom filtering form twice for invalid filter descriptor.
1. Create a new project with RadGridView. 2. Make all columns read only. 3. Use Ctrl+x, +v and +c key combinations.
1. Create RadGridView with hierarchy. 2. Set UseScrollbarsInHierarchy property to true. 3. Handle the CellDoubleClick event. 4. Run the project, open a child view and double click on its scrollbar. The CellDoubleClick event will fire which is wrong.
To reproduce: - add a grid to the form and use the following code for its setup: radGridView2.Columns.Add("ID"); radGridView2.Columns.Add("Title"); radGridView2.MultiSelect = true; radGridView2.Columns[0].SortOrder = RadSortOrder.Ascending; radGridView2.ReadOnly = true; radGridView2.BeginUpdate(); for (int i = 0; i < 5; i++) { GridViewDataRowInfo row = new GridViewDataRowInfo(radGridView2.MasterTemplate.MasterViewInfo); row.Cells["ID"].Value = i; row.Cells["Title"].Value = "Title " + i; radGridView2.Rows.Add(row); } radGridView2.EndUpdate(true); radGridView2.Rows[0].IsCurrent = true; radGridView2.Rows[0].IsSelected= true; - Once the application is started, hold down the shift key and click the third row in the grid Expected result: the first three rows are selected Actual result: the last three rows are selected WORKAROUND: Use the BeginUpdate and EndUpdate methods of the TableElement, not the control: radGridView2.TableElement.BeginUpdate(); //add rows radGridView2.TableElement.EndUpdate(true);
Filtering does not work correctly when NotConains and Contains filters are combined. Work around: private void radGridView1_FilterExpressionChanged(object sender, FilterExpressionChangedEventArgs e) { List<string> filterExpressions = new List<string>(); for (int i = 0; i < this.radGridView1.FilterDescriptors.Count; i++) { FilterDescriptor descriptor = this.radGridView1.FilterDescriptors[i]; string expression = null; CompositeFilterDescriptor compositeFilterDescriptor = descriptor as CompositeFilterDescriptor; if (compositeFilterDescriptor != null) { expression = CompositeFilterDescriptor.GetCompositeExpression(compositeFilterDescriptor); } else { expression = FilterDescriptor.GetExpression(descriptor); } if (!string.IsNullOrEmpty(expression)) { filterExpressions.Add("(" + expression + ")"); } } string logicalOperator = (this.radGridView1.FilterDescriptors.LogicalOperator == FilterLogicalOperator.And) ? " AND " : " OR "; string resultExpression = String.Join(logicalOperator, filterExpressions.ToArray()); e.FilterExpression = resultExpression; }
Export to excel fails when there is null values for GridViewDateTimeColumn. The following code snippet reproduce the issue: ExportToExcelML export = new ExportToExcelML(gridView); export.HiddenColumnOption = HiddenOption.DoNotExport; export.HiddenRowOption = HiddenOption.DoNotExport; export.ExportVisualSettings = false; export.SheetMaxRows = ExcelMaxRows._1048576; export.RunExport(targetFileName);
This method should return true if successful.
FIX. RadGridViiew - HierarchyLevel property shows incorrect hierarchy level for GridNewRowElement in grid with hierarchy.
The alternating row color in RadGridView does not work when the control is in unbound mode and LoadFrom method is used. Resolution: The issue is duplicated with feedback item FIX. RadGridView - AlternatingRowColor does not work when data is loaded in the RadGridView from a IDataReader Here is the link to item: http://feedback.telerik.com/Project/154/Feedback/Details/112656-fix-radgridview-alternatingrowcolor-does-not-work-when-data-is-loaded-in-the-r
Object-hierarchy produces same child rows for every parent row.
If RadDropDownListEditor has DropDown style and you write a value which exists in the underline data source, it does not become current value.
The summary aggregate expression IIF(SUM(RecordCount) = 0, 0, 1/SUM(RecordCount)) causes exception in RadGridView.