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; }
Use attached to reproduce. - Check then try to uncheck the rows. Workaround: private void RadGridView1_CreateCell(object sender, GridViewCreateCellEventArgs e) { if (e.CellType == typeof(GridCheckBoxHeaderCellElement)) { e.CellElement = new MyHeaderCheckboxCellElement(e.Column, e.Row); } } class MyHeaderCheckboxCellElement : GridCheckBoxHeaderCellElement { public MyHeaderCheckboxCellElement(GridViewColumn col, GridRowElement row) : base (col, row) { } protected override void checkbox_ToggleStateChanged(object sender, StateChangedEventArgs args) { base.checkbox_ToggleStateChanged(sender, args); var prop = this.ViewInfo.GetType().GetProperty("Version", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance); int value = (int)prop.GetValue(this.ViewInfo); prop.SetValue(this.ViewInfo, --value); } }
Use attached to reproduce. - Open the data filter dialog from the excel-like filtering on the date column. - The date time format in the editor is not respected. - Consider the default cell editor as well. Workaround: private void RadGridView1_CreateCompositeFilterDialog(object sender, GridViewCreateCompositeFilterDialogEventArgs e) { var dialog = e.Dialog as CompositeDataFilterForm; dialog.DataFilter.EditorInitialized -= DataFilter_EditorInitialized; dialog.DataFilter.EditorInitialized += DataFilter_EditorInitialized; dialog.DataFilter.NodeFormatting -= DataFilter_NodeFormatting; dialog.DataFilter.NodeFormatting += DataFilter_NodeFormatting; } private void DataFilter_NodeFormatting(object sender, TreeNodeFormattingEventArgs e) { var criteriaNode = e.NodeElement as DataFilterCriteriaElement; if (criteriaNode != null) { var node = criteriaNode.Data as DataFilterCriteriaNode; if (node.DescriptorValue != null && node.PropertyName == "Date") { criteriaNode.ValueElement.Text = ((DateTime?)node.DescriptorValue).Value.ToString("MM/dd/yyyy"); } } } private void DataFilter_EditorInitialized(object sender, TreeNodeEditorInitializedEventArgs e) { var editor = e.Editor as TreeViewDateTimeEditor; if (editor != null) { var element = editor.EditorElement as BaseDateTimeEditorElement; element.Format = DateTimePickerFormat.Custom; element.CustomFormat = "dd/MM/yyyy"; } }
To reproduce: setup self-reference hierarchy. Add a GridViewHyperlinkColumn and show the expander item in this column. Please refer to the attached screenshot. The hyperlink text overlaps with the expander. Workaround: set the MasterTemplate.SelfReferenceExpanderColumn to a different column.
Use attached to reproduce. - Edit random cell and press Enter. - Check the CellValueChanged event handler, the changes variable is null. This will work if you comment the OnShown method. Workaround: IEditableObject editbaleObject = radGridView1.CurrentRow.DataBoundItem as IEditableObject; if (editbaleObject != null) { editbaleObject.EndEdit(); }
How to reproduce: bind the grid using the code snippet below and enter name in the SearchRow public partial class RadForm1 : Telerik.WinControls.UI.RadForm { public RadForm1() { InitializeComponent(); this.radGridView1.DataSource = this.GetData(); this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; this.radGridView1.AllowSearchRow = true; this.radGridView1.MasterView.TableSearchRow.InitialSearchResultsTreshold = 0; this.radGridView1.MasterView.TableSearchRow.SearchResultsGroupSize = int.MaxValue;; } private DataTable GetData() { DataTable dt = new DataTable(); dt.Columns.Add("Id", typeof(int)); dt.Columns.Add("Name", typeof(string)); dt.Columns.Add("Date", typeof(DateTime)); dt.Columns.Add("Bool", typeof(bool)); dt.Columns.Add("Description", typeof(string)); for (int i = 0; i < 2000; i++) { for (int j = 0; j < 5; j++) { dt.Rows.Add(i, "Name " + j, DateTime.Now.AddDays(i), i % 2 == 0 , "Description " + i); } } return dt; } } Workaround: in the search row, set the InitialSearchResultsTreshold property to 0 and the SearchResultsGroupSize property to int.MaxValue public RadForm1() { InitializeComponent(); this.radGridView1.DataSource = this.GetData(); this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; this.radGridView1.AllowSearchRow = true; this.radGridView1.MasterView.TableSearchRow.SearchProgressChanged += TableSearchRow_SearchProgressChanged; this.radGridView1.MasterView.TableSearchRow.InitialSearchResultsTreshold = 0; this.radGridView1.MasterView.TableSearchRow.SearchResultsGroupSize = int.MaxValue; }
To reproduce: GridViewCheckBoxColumn chkCol = new GridViewCheckBoxColumn(); chkCol.HeaderText = "I have wrap text set yet I cannot see full column header text."; chkCol.Width = 90; chkCol.WrapText = true; chkCol.EnableHeaderCheckBox = true; chkCol.EditMode = EditMode.OnValueChange; radGridView1.Columns.Add(chkCol); Workaround: private void RadGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) { var cell = e.CellElement as GridCheckBoxHeaderCellElement; if (cell != null) { cell.CheckBox.TextWrap = true; } }
Use attached to reproduce! Workaround: remove the Begin\End update block.
To reproduce: run the sample approach an follow the steps: 1. Filter the "Mask" column by entering " " in the filter cell. Press Enter. The grid is filtered as expected. 2. Activate the editor again and press Backspace+Enter. You will notice that it is not possible to clear the applied filter. Workaround: use GridViewTextBoxColumn
To reproduce: private void radButton1_Click(object sender, EventArgs e) { RadPrintDocument printDocument = new RadPrintDocument(); printDocument.DefaultPageSettings.Landscape = true; printDocument.DocumentName = "Example Case"; GridPrintStyle style = new GridPrintStyle(this.radGridView1) { FitWidthMode = PrintFitWidthMode.FitPageWidth, PrintGrouping = false, PrintSummaries = false, PrintHeaderOnEachPage = true, PrintHiddenColumns = false, }; TableViewDefinitionPrintRenderer renderer = new TableViewDefinitionPrintRenderer(this.radGridView1); renderer.PrintPages.Add( this.radGridView1.Columns[1], this.radGridView1.Columns[2], this.radGridView1.Columns[3], this.radGridView1.Columns[4], this.radGridView1.Columns[5], this.radGridView1.Columns[6]); style.PrintRenderer = renderer; this.radGridView1.PrintStyle = style; this.radGridView1.PrintCellFormatting += RadGridView1_PrintCellFormatting; radGridView1.Print(true, printDocument); } private void RadGridView1_PrintCellFormatting(object sender, Telerik.WinControls.UI.PrintCellFormattingEventArgs e) { } Workaround: use the PrintCellFormatting of the TableViewDefinitionPrintRenderer
To reproduce: if (e.CellElement.ColumnInfo.HeaderText == "CategoryID") { e.CellElement.DrawText = false; } else { e.CellElement.ResetValue(LightVisualElement.DrawTextProperty, ValueResetFlags.Local); } Workaround: e.CellElement.DrawText = true;
Hi, We got an issue comparable to the one already described (see 245938), using the same demo project 1) I add LastDeliveryDateTimeLocal column 2) remove groups 3) click on "Start async notifications" 4) click on the filter icon next to "LastDeliveryDateTimeLocal" column name 5) uncheck some values (08/09/2016, 11/11/2016, 03/01/2017) 6) click Ok => NullReferenceException
Use attached to reproduce. Workaround: class MySpreadExportRenderer : SpreadExportRenderer { public override void SetWorksheetColumnWidth(int columnIndex, double value, bool isCustom) { if (value > 2000) { value = 2000; } base.SetWorksheetColumnWidth(columnIndex, value, isCustom); } }
How to reproduce: check the attached project and comment the workaround Workaround: public partial class RadForm1 : Telerik.WinControls.UI.RadForm { private BindingList<TestDataObject> data; public RadForm1() { InitializeComponent(); this.data = new BindingList<TestDataObject>(); this.LoadData(); GridViewTextBoxColumn textColumn = new GridViewTextBoxColumn(); textColumn.Name = "Name"; textColumn.FieldName = "Name"; textColumn.HeaderText = "Name"; this.radGridView1.Columns.Add(textColumn); GridViewDateTimeColumn dateColumn = new GridViewDateTimeColumn(); dateColumn.Name = "Date"; dateColumn.FieldName = "Date"; dateColumn.HeaderText = "Date"; this.radGridView1.Columns.Add(dateColumn); GridViewMaskBoxColumn maskBoxColumn = new GridViewMaskBoxColumn(); maskBoxColumn.Name = "Price"; maskBoxColumn.FieldName = "Price"; maskBoxColumn.HeaderText = "Price"; maskBoxColumn.MaskType = MaskType.Numeric; maskBoxColumn.Mask = "C"; maskBoxColumn.TextAlignment = ContentAlignment.BottomRight; maskBoxColumn.FormatString = "{0:C}"; maskBoxColumn.DataType = typeof(decimal); this.radGridView1.Columns.Add(maskBoxColumn); this.radGridView1.DataSource = this.data; this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; //Workaround this.radGridView1.CellBeginEdit += RadGridView1_CellBeginEdit; this.radGridView1.EditorRequired += RadGridView1_EditorRequired; } void RadGridView1_EditorRequired(object sender, EditorRequiredEventArgs e) { if (e.EditorType == typeof(RadMaskedEditBoxEditor)) { e.EditorType = typeof(MyRadMaskedEditBoxEditor); } } private void RadGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e) { RadMaskedEditBoxEditor maskedEditBoxEditor = e.ActiveEditor as RadMaskedEditBoxEditor; if (maskedEditBoxEditor != null && e.Row.Cells[e.ColumnIndex].Value == null) { maskedEditBoxEditor.MaskTextBox.EnableNullValueInput = true; } else { maskedEditBoxEditor.MaskTextBox.EnableNullValueInput = false; } } private void LoadData() { for (int i = 0; i < 1000; i++) { decimal? price = null; if (i % 2 == 0) { price = i * 100; } this.data.Add(new TestDataObject { Name = "Name " + i, Date = DateTime.Now.AddDays(i), Price = price }); } } } public class TestDataObject { public string Name { get; set; } public DateTime Date { get; set; } public decimal? Price { get; set; } } public class MyRadMaskedEditBoxEditor : RadMaskedEditBoxEditor { public override object Value { get { return base.Value; } set { if (value == null && (this.MaskTextBox.EnableNullValueInput || this.MaskTextBox.MaskType != MaskType.Numeric)) { this.MaskTextBox.Value = this.NullValue; } else { base.Value = value; } } } }
To reproduce: please refer to the attached gif file illustrating the steps how to reproduce the problem with the Demo application. Workaround: private void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e) { GridDataCellElement cell = e.CellElement as GridDataCellElement; if (cell != null) { if (cell.ContainsErrors) { cell.DrawBorder = true; cell.BorderBoxStyle = BorderBoxStyle.FourBorders; cell.BorderBottomColor = cell.BorderTopColor = cell.BorderRightShadowColor = cell.BorderLeftShadowColor = Color.Transparent; cell.BorderBottomShadowColor = cell.BorderTopShadowColor = cell.BorderRightColor = cell.BorderLeftColor = Color.Red; cell.BorderBottomWidth = cell.BorderTopWidth = cell.BorderRightWidth = cell.BorderLeftWidth = 1; cell.BorderDrawMode = BorderDrawModes.HorizontalOverVertical; cell.ZIndex = 2; } else { cell.ResetValue(LightVisualElement.DrawBorderProperty, ValueResetFlags.Local); cell.ResetValue(LightVisualElement.BorderBoxStyleProperty, ValueResetFlags.Local); cell.ResetValue(LightVisualElement.BorderBottomColorProperty, ValueResetFlags.Local); cell.ResetValue(LightVisualElement.BorderBottomShadowColorProperty, ValueResetFlags.Local); cell.ResetValue(LightVisualElement.BorderBottomWidthProperty, ValueResetFlags.Local); cell.ResetValue(LightVisualElement.BorderTopColorProperty, ValueResetFlags.Local); cell.ResetValue(LightVisualElement.BorderTopShadowColorProperty, ValueResetFlags.Local); cell.ResetValue(LightVisualElement.BorderTopWidthProperty, ValueResetFlags.Local); cell.ResetValue(LightVisualElement.BorderLeftColorProperty, ValueResetFlags.Local); cell.ResetValue(LightVisualElement.BorderLeftShadowColorProperty, ValueResetFlags.Local); cell.ResetValue(LightVisualElement.BorderLeftWidthProperty, ValueResetFlags.Local); cell.ResetValue(LightVisualElement.BorderDrawModeProperty, ValueResetFlags.Local); cell.ResetValue(LightVisualElement.ZIndexProperty, ValueResetFlags.Local); } } }
To reproduce: please refer to the attached sample gif file. Note that it is important that the child template is bound at design time and the columns are automatically generated. Workaround: setup the ViewDefinition programmatically:
Use attached to reproduce. Workaround: private void RadGridView1_ColumnChooserCreated(object sender, Telerik.WinControls.UI.ColumnChooserCreatedEventArgs e) { var columnChooser = e.ColumnChooser as GridViewColumnChooser; columnChooser.Shown -= ColumnChooser_Shown; columnChooser.Shown += ColumnChooser_Shown; } private void ColumnChooser_Shown(object sender, EventArgs e) { var columnChooser = sender as GridViewColumnChooser; var factor = this.FormElement.DpiScaleFactor; columnChooser.Scale(factor); }