How to reproduce: 1. Click DrugName Filter Icon. 2. Uncheck Combivent 3. OK 4. Click name Filter Icon 5. Uncheck Christoff 6. OK 7. Click DrugName Filter Icon 8. Uncheck Dilantin 9. OK In this scenario the grid should display only 2 rows but it displays 3. public partial class RadForm1 : Telerik.WinControls.UI.RadForm { public List<Drug> DrugList { get; set; } public RadForm1() { InitializeComponent(); DrugList = new List<Drug>(); LoadDrugList(); radGridView1.DataSource = DrugList; radGridView1.EnableFiltering = true; this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; this.radGridView1.MultiSelect = true; } protected override void OnLoad(EventArgs e) { base.OnLoad(e); radGridView1.MasterTemplate.ShowFilteringRow = false; radGridView1.MasterTemplate.ShowHeaderCellButtons = true; } void LoadDrugList() { DrugList.Add(new Drug { Dosage = 25, DrugName = "Indocin", Name = "David"}); DrugList.Add(new Drug { Dosage = 50, DrugName = "Enebrel", Name = "Sam" }); DrugList.Add(new Drug { Dosage = 10, DrugName = "Hydralazine", Name = "Christoff"}); DrugList.Add(new Drug { Dosage = 21, DrugName = "Combivent", Name = "Janet"}); DrugList.Add(new Drug { Dosage = 100, DrugName = "Dilantin", Name = "Melanie"}); } } Workaround: use a custom filter popup public partial class RadForm1 : Telerik.WinControls.UI.RadForm { public List<Drug> DrugList { get; set; } public RadForm1() { InitializeComponent(); DrugList = new List<Drug>(); LoadDrugList(); radGridView1.DataSource = DrugList; radGridView1.EnableFiltering = true; this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; this.radGridView1.MultiSelect = true; this.radGridView1.FilterPopupRequired += RadGridView1_FilterPopupRequired; } private void RadGridView1_FilterPopupRequired(object sender, FilterPopupRequiredEventArgs e) { e.FilterPopup = new CustomRadListFilterPopup(e.Column); } protected override void OnLoad(EventArgs e) { base.OnLoad(e); radGridView1.MasterTemplate.ShowFilteringRow = false; radGridView1.MasterTemplate.ShowHeaderCellButtons = true; } void LoadDrugList() { DrugList.Add(new Drug { Dosage = 25, DrugName = "Indocin", Name = "David"}); DrugList.Add(new Drug { Dosage = 50, DrugName = "Enebrel", Name = "Sam" }); DrugList.Add(new Drug { Dosage = 10, DrugName = "Hydralazine", Name = "Christoff"}); DrugList.Add(new Drug { Dosage = 21, DrugName = "Combivent", Name = "Janet"}); DrugList.Add(new Drug { Dosage = 100, DrugName = "Dilantin", Name = "Melanie"}); } } public class CustomRadListFilterPopup : RadListFilterPopup { public CustomRadListFilterPopup(GridViewDataColumn dataColumn) : base(dataColumn) { } protected override void OnButtonOkClick(EventArgs e) { FilterMenuTreeItem treeMenuItem = this.Items.FirstOrDefault(i => i is FilterMenuTreeItem) as FilterMenuTreeItem; if (treeMenuItem == null) { base.OnButtonOkClick(e); } FilterMenuTreeElement listFilterElement = treeMenuItem.TreeElement; FilterOperator filterOperator = FilterOperator.IsEqualTo; switch (listFilterElement.SelectedMode) { case ListFilterSelectedMode.All: filterOperator = FilterOperator.None; break; case ListFilterSelectedMode.Null: filterOperator = FilterOperator.IsNull; break; case ListFilterSelectedMode.NotNull: filterOperator = FilterOperator.IsNotNull; break; } if (filterOperator != FilterOperator.IsEqualTo) { SetFilterOperator(filterOperator); this.ClosePopup(RadPopupCloseReason.CloseCalled); } else { CompositeFilterDescriptor compositeFilterDescriptor = new CompositeFilterDescriptor(); compositeFilterDescriptor.PropertyName = this.DataColumn.Name; RadListFilterDistinctValuesTable distinctValues = this.GetDistinctValuesTable(); string blanksKey = RadGridLocalizationProvider.CurrentProvider.GetLocalizedString(RadGridStringId.FilterMenuBlanks); bool blanks = listFilterElement.SelectedValues.Contains(blanksKey); compositeFilterDescriptor.LogicalOperator = FilterLogicalOperator.And; foreach (DictionaryEntry entry in distinctValues) { object key = entry.Key; if (string.IsNullOrEmpty(Convert.ToString(key))) { key = blanksKey; } if (this.DataColumn is GridViewDateTimeColumn || this.DataColumn.DataType == typeof(DateTime) || this.DataColumn.DataType == typeof(DateTime?)) { DateTime dateTime; if (DateTime.TryParse(key.ToString(), out dateTime)) { object dataKey; if (RadDataConverter.Instance.TryFormat(treeMenuItem.TreeElement.GroupedDateValues ? dateTime.Date : dateTime, typeof(string), this.DataColumn, out dataKey) == null) { key = dataKey; } } } if (!listFilterElement.SelectedValues.Contains(key)) { foreach (object value in (ArrayList)entry.Value) { FilterDescriptor descriptor; if (value == DBNull.Value) { descriptor = new FilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, null); } else if (this.DataColumn is GridViewDateTimeColumn || this.DataColumn.DataType == typeof(DateTime) || this.DataColumn.DataType == typeof(DateTime?)) { descriptor = new DateFilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, (DateTime?)value, false); } else { descriptor = new FilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, value); } compositeFilterDescriptor.FilterDescriptors.Add(descriptor); } } } if (this.DataColumn.FilterDescriptor != null) { CompositeFilterDescriptor compositeFilter = this.DataColumn.FilterDescriptor as CompositeFilterDescriptor; if (compositeFilter != null) { foreach (var item in compositeFilter.FilterDescriptors) { if (listFilterElement.SelectedValues.Contains(item.Value)) { continue; } FilterDescriptor descriptor = new FilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, item.Value); compositeFilterDescriptor.FilterDescriptors.Add(descriptor); } } else if(!listFilterElement.SelectedValues.Contains(this.DataColumn.FilterDescriptor.Value)) { FilterDescriptor descriptor = new FilterDescriptor(this.DataColumn.Name, FilterOperator.IsNotEqualTo, this.DataColumn.FilterDescriptor.Value); compositeFilterDescriptor.FilterDescriptors.Add(descriptor); } } this.FilterDescriptor = compositeFilterDescriptor; OnFilterConfirmed(); } } }
To reproduce: use the following code snippet: Sub New() InitializeComponent() Dim view As New ColumnGroupsViewDefinition() view.ColumnGroups.Add(New GridViewColumnGroup("Customer Contact")) view.ColumnGroups.Add(New GridViewColumnGroup("Details")) view.ColumnGroups(1).Groups.Add(New GridViewColumnGroup("Address")) view.ColumnGroups(1).Groups.Add(New GridViewColumnGroup("Contact")) view.ColumnGroups(0).Rows.Add(New GridViewColumnGroupRow()) view.ColumnGroups(0).Rows(0).ColumnNames.Add("CompanyName") view.ColumnGroups(0).Rows(0).ColumnNames.Add("ContactName") view.ColumnGroups(0).Rows(0).ColumnNames.Add("ContactTitle") view.ColumnGroups(1).Groups(0).Rows.Add(New GridViewColumnGroupRow()) view.ColumnGroups(1).Groups(0).Rows(0).ColumnNames.Add("Address") view.ColumnGroups(1).Groups(0).Rows(0).ColumnNames.Add("City") view.ColumnGroups(1).Groups(0).Rows(0).ColumnNames.Add("Country") view.ColumnGroups(1).Groups(1).Rows.Add(New GridViewColumnGroupRow()) view.ColumnGroups(1).Groups(1).Rows(0).ColumnNames.Add("Phone") view.ColumnGroups(1).Groups(1).Rows(0).ColumnNames.Add("Fax") RadGridView1.ViewDefinition = view End Sub Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.CustomersTableAdapter.Fill(Me.NwindDataSet.Customers) Me.RadGridView1.BestFitColumns(BestFitColumnMode.AllCells) RadGridView1.Columns("Fax").IsVisible = False RadGridView1.Columns("Phone").IsVisible = False Dim spreadExporter As GridViewSpreadExport = New GridViewSpreadExport(Me.RadGridView1) Dim exportRenderer As New SpreadExportRenderer() spreadExporter.HiddenColumnOption = Export.HiddenOption.ExportAsHidden spreadExporter.FreezeHeaderRow = True spreadExporter.ExportGroupedColumns = True spreadExporter.ExportChildRowsGrouped = True spreadExporter.ExportVisualSettings = True spreadExporter.ExportHierarchy = True spreadExporter.ExportViewDefinition = True spreadExporter.ExportFormat = SpreadExportFormat.Xlsx Dim fileName = "..\..\export" & DateTime.Now.ToLongTimeString().Replace(":", "_") & ".xlsx" spreadExporter.RunExport(fileName, exportRenderer) Process.Start(fileName) End Sub Workaround: instead of hiding all the columns inside a group, hide the entire group: Sub New() InitializeComponent() Dim view As New ColumnGroupsViewDefinition() view.ColumnGroups.Add(New GridViewColumnGroup("Customer Contact")) view.ColumnGroups.Add(New GridViewColumnGroup("Details")) view.ColumnGroups(1).Groups.Add(New GridViewColumnGroup("Address")) view.ColumnGroups(1).Groups.Add(New GridViewColumnGroup("Contact")) view.ColumnGroups(0).Rows.Add(New GridViewColumnGroupRow()) view.ColumnGroups(0).Rows(0).ColumnNames.Add("CompanyName") view.ColumnGroups(0).Rows(0).ColumnNames.Add("ContactName") view.ColumnGroups(0).Rows(0).ColumnNames.Add("ContactTitle") view.ColumnGroups(1).Groups(0).Rows.Add(New GridViewColumnGroupRow()) view.ColumnGroups(1).Groups(0).Rows(0).ColumnNames.Add("Address") view.ColumnGroups(1).Groups(0).Rows(0).ColumnNames.Add("City") view.ColumnGroups(1).Groups(0).Rows(0).ColumnNames.Add("Country") view.ColumnGroups(1).Groups(1).Rows.Add(New GridViewColumnGroupRow()) view.ColumnGroups(1).Groups(1).Rows(0).ColumnNames.Add("Phone") view.ColumnGroups(1).Groups(1).Rows(0).ColumnNames.Add("Fax") RadGridView1.ViewDefinition = view view.ColumnGroups(1).Groups.Last().IsVisible=False End Sub
To reproduce: change the decimal separator to ",". Please refer to the attached sample project and follow the steps from the attached gif file. Workaround: change the CurrentCulture in your application in order to affect the decimal separator: Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB");
To reproduce: - Add a checkbox column and hide some of the cells. - Change some values and then click on empty cell. - Exception occurs in OnMouseDownLeft method (GridRowBeahvior class) Workaround: Hide the checkbox only.
To reproduce: - Use a column with numbers stored as strings. - Set the data type to decimal - The columns should be sorted according to the number value not alphabetically. Workaround: var col = new GridViewTextBoxColumn(); col.DataTypeConverter = new DecimalConverter(); col.FieldName = "Dosage"; col.UseDataTypeConverterWhenSorting = true; col.DataType = typeof(decimal); radGridView1.Columns.Add(col); public class DecimalConverter : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext context, Type destination_type) { if (destination_type == typeof(decimal)) { return true; } return base.CanConvertTo(context, destination_type); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destination_type) { if (destination_type == typeof(decimal)) { return decimal.Parse(value.ToString()); } return base.ConvertTo(context, culture, value, destination_type); } }
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
Workaround: private void radGridView1_ConditionalFormattingFormShown(object sender, EventArgs e) { ConditionalFormattingForm f = sender as ConditionalFormattingForm; if (f != null) { RadPropertyGrid radPropertyGridProperties = f.Controls["radPropertyGridProperties"] as RadPropertyGrid; radPropertyGridProperties.ItemFormatting += radPropertyGridProperties_ItemFormatting; radPropertyGridProperties.ItemFormatting += radPropertyGridProperties_ItemFormatting; } } private void radPropertyGridProperties_ItemFormatting(object sender, PropertyGridItemFormattingEventArgs e) { if (e.Item.Label=="CellFont") { e.Item.Label = "aaa"; } }
Workaround: private void radGridView1_ConditionalFormattingFormShown(object sender, EventArgs e) { ConditionalFormattingForm f = sender as ConditionalFormattingForm; if (f != null) { f.Width += 5; } }
This can be used for large amounts of data. Check this - https://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfstreamwriter/pdfstreamwriter
To reproduce: 1. Add a RadMultiColumnComboBox and populate it with data. 2. Set the DropDownStyle property of the control to DropDownList 3. Set the EditorControl.AllowSearchRow and the AutoSizeDropDownToBestFit properties to true . 4. When you open the drop down and try to use the search row (e.g. clicking over the arrow buttons), the drop down is closed. Workaround: public partial class RadForm1 : Telerik.WinControls.UI.RadForm { public RadForm1() { InitializeComponent(); this.radMultiColumnComboBox1.EditorControl.AllowSearchRow = true; this.radMultiColumnComboBox1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList; this.radMultiColumnComboBox1.DropDownClosing += RadMultiColumnComboBox1_DropDownClosing; } private void RadMultiColumnComboBox1_DropDownClosing(object sender, RadPopupClosingEventArgs args) { Point position = this.radMultiColumnComboBox1.EditorControl.PointToClient(Cursor.Position); Telerik.WinControls.RadElement searchElement = this.radMultiColumnComboBox1.EditorControl.ElementTree.GetElementAtPoint(position); if (searchElement != null) { GridSearchCellElement parent = searchElement.FindAncestor<GridSearchCellElement>(); if (parent != null) { args.Cancel = true; } } } }
A possible workaround is to use the following KB and change how it is implemented to iterate the MasterTemplate.Rows collection instead of the ViewInfo.Rows collection https://www.telerik.com/support/kb/winforms/gridview/details/add-check-all-in-the-header-cell-for-a-gridviewcheckboxcolumn
To reproduce: please refer to the attached gif file. Apply a conditional formatting rule for the current time's minute. Then, after a minute later, try to edit the already applied rule and change the minute value, you will notice that the color is cleared, but the new one is not applied. Workaround: use the CellFormatting event https://docs.telerik.com/devtools/winforms/gridview/cells/formatting-cells
To reproduce: please refer to the attached screenshot public RadForm1() { InitializeComponent(); ThemeResolutionService.ApplicationThemeName = "Fluent"; this.BackColor = Color.White; this.radGridView1.EnableGrouping = false; } Workaround: this.radGridView1.TableElement.Margin = new Padding(0, 1, 0, 0);
Use attached to reproduce: - Just search for something and you will notice that the waiting bar does not disappear. Workaround: public RadForm1() { InitializeComponent(); radGridView1.MasterView.TableSearchRow.IsSearchAsync = false; radGridView1.MasterView.TableSearchRow.SearchProgressChanged += TableSearchRow_SearchProgressChanged; } private void TableSearchRow_SearchProgressChanged(object sender, SearchProgressChangedEventArgs e) { var searchCell = radGridView1.TableElement.FindDescendant<GridSearchCellElement>(); if (searchCell != null) { var waitingBar = searchCell.Children[1] as RadWaitingBarElement; waitingBar.StopWaiting(); waitingBar.Visibility = Telerik.WinControls.ElementVisibility.Collapsed; } }
To reproduce: - Set IsSearchAsync to false. - Search for something and press down arrow to navigate to the last found item. - Press down again the selection is not moved to the first item.
Use attached to reproduce. Workaround: private void RadGridView1_UserAddingRow(object sender, GridViewRowCancelEventArgs e) { e.Cancel = true; }
To reproduce: - Add ColumnGroupsViewDefinition and set ShowHeader to false. - Set AutoSizeRows to true. Workaround: Manually set the row height. ViewDefinition.ColumnGroups(0).Rows(0).MinHeight = 50
To reproduce: run the attached sample project and activate the editor for the cell. You will notice that the row's height is now adjusted and single line text is displayed. It seems that the issue occurs because of the set Font property of the grid. Workaround: private void RadGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e) { e.Row.MinHeight = e.Row.Height + 3; RadTextBoxEditor tbEditor = e.ActiveEditor as RadTextBoxEditor; if (tbEditor != null) { tbEditor.Multiline = true; } } private void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e) { e.Row.MinHeight = 0; }
To reproduce: add a RadGridView with several columns. Set the Enabled property to false. Try to open the Property Builder and you will notice that the Columns are disabled in it. Workaround: set the Enabled property to false at run time. Thus, it would be possible to manipulate the columns via the Property Builder at design time.