To reproduce: - Add a column to the grid and try to set its IsPinned property to true.
To reproduce: 1. Add a RadGridView, set ShowRowHeaderColumn to false, AutoSizeColumnsMode to Fill and Dock to Fill. 2. Add 3 columns and 1 row. 3. Start the application and click the leftmost cell, you will notice that the header will move with one pixel to the right. 4. Click the rightmost cell and you will notice the header moving one pixel to the left
RadGridView - CustomGrouping event is not firing when you change some cell value and RadGridView is data bound via DataSource property. Workaround: 1.Subscribe to CellEndEdit event of RadGridView: this.radGridView1.CellEndEdit += new GridViewCellEventHandler(radGridView1_CellEndEdit); 2. Call Refresh method of MasterTemplate: void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e) { this.radGridView1.MasterTemplate.Refresh(); }
If you change the RadGridView in design-time by property builder, the smart tag disappears after closing the builder.
To reproduce: - Add GridViewDateTimeColumn. - Set the editor properties: private void radGridView_VehicleAbsenceTime_CellEditorInitialized(object sender, GridViewCellEventArgs e) { RadDateTimeEditor lEditor = radGridView_VehicleAbsenceTime.ActiveEditor as RadDateTimeEditor; if (lEditor != null) { RadDateTimeEditorElement editorElement = (RadDateTimeEditorElement)lEditor.EditorElement; editorElement.Format = DateTimePickerFormat.Custom; editorElement.CustomFormat = "dd.MM.yyyy HH:mm"; editorElement.ShowUpDown = true; } } - Start the application scroll to the bottom and start editing.
1. Use the following code snippet: public Form1() { InitializeComponent(); this.radGridView1.MasterTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; this.radGridView1.MasterTemplate.EnableAlternatingRowColor = true; this.radGridView1.MasterTemplate.EnableFiltering = true; this.radGridView1.MasterTemplate.MultiSelect = true; for (int i = 0; i < 3; i++) { this.radGridView1.Columns.Add("Col"+i); } radGridView1.Rows.Add("test1", "test1", "test1"); radGridView1.Rows.Add("test2", "test2", "test2"); radGridView1.Rows.Add("test3", "test3", "test3"); radGridView1.Rows.Add("test4", "test4", "test4"); radGridView1.Rows.Add("test5", "test5", "test5"); } 2. Quickly click around the cells a few times, making sure to drag your mouse a bit to select a few rows on some of the clicks. Then quickly click the filter. (sometimes it takes a few tries) Workaround: use custom GridFilterRowBehavior BaseGridBehavior gridBehavior = radGridView1.GridBehavior as BaseGridBehavior; gridBehavior.UnregisterBehavior(typeof(GridViewFilteringRowInfo)); gridBehavior.RegisterBehavior(typeof(GridViewFilteringRowInfo), new CustomGridFilterRowBehavior()); public class CustomGridFilterRowBehavior : GridFilterRowBehavior { protected override bool ProcessMouseSelection(Point mousePosition, GridCellElement currentCell) { return false; } }
Self-referencing hierarchy does not work, when ColumGroupsViewDefinition is applied.
There is wrong current row selection for bound RadGridView, when using AddNew and ResetBindings methods on same BindingSource.
Steps to reproduce: 1. Add a GridViewDateTimeColumn to a grid. 2. Add rows where one or more rows should contain null as the columns value. 3. Sort the grid by the date time column. WORKAROUND: Create a custom RadGridDateTimeConverter and assign it as the column's date type converter: public class CustomRadGridDateTimeConverter : RadGridDateTimeConverter { public CustomRadGridDateTimeConverter(GridViewDateTimeColumn column) : base(column) { } public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(DateTime) && value == null) { return DateTime.MinValue; } return base.ConvertTo(context, culture, value, destinationType); } } this.radGridView1.Columns["DateTime"].DataTypeConverter = new CustomRadGridDateTimeConverter(this.radGridView1.Columns["DateTime"] as GridViewDateTimeColumn);
Workaround: set the theme with ThemeResolutionService.ApplicationThemeName = "MyThemeName
Note: if you try to clear the initial minimum value by pressing Backspace or Delete key, the editor value reappears. To reproduce: GridViewDecimalColumn decimalColumn2 = new GridViewDecimalColumn("Col2"); decimalColumn2.FieldName = "Number"; decimalColumn2.Minimum = -50; decimalColumn2.Maximum = 50; radGridView2.MasterTemplate.Columns.Add(decimalColumn2); radGridView2.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; radGridView2.EnableFiltering = true; Workaround: private void radGridView2_EditorRequired(object sender, Telerik.WinControls.UI.EditorRequiredEventArgs e) { if (e.EditorType == typeof(GridSpinEditor)) { e.EditorType = typeof(CustomEditor); } } public class CustomEditor : GridSpinEditor { protected override Telerik.WinControls.RadElement CreateEditorElement() { return new CustomElement(); } } public class CustomElement : GridSpinEditorElement { protected override decimal GetValueFromText() { if (string.IsNullOrEmpty(this.Text)) { return this.MinValue; } return base.GetValueFromText(); } }
To reproduce: 1. Add a GridViewDecimalColumn to a grid with data type int, float, decimal, double, real, money. 2. Add few rows where one of rows contains null value. 3. Run the form. Sort the grid by any of column with null data and you will see that the exception is thrown. Workaround: 1. Use custom TypeConverter public class CustomFloatConverter : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { return destinationType == typeof(float); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(float) && (value == null || value is DBNull)) { return float.MinValue; } return value; } } public class CustomIntConverter : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { return destinationType == typeof(int); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(int) && (value == null || value is DBNull)) { return int.MinValue; } return value; } } public class CustomDecimalConverter : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { return destinationType == typeof(decimal); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(decimal) && (value == null || value is DBNull)) { return decimal.MinValue; } return value; } } public class CustomDoubleConverter : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { return destinationType == typeof(double); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(double) && (value == null || value is DBNull)) { return double.MinValue; } return value; } } public class CustomSingleConverter : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { return destinationType == typeof(Single); } public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(Single) && (value == null || value is DBNull)) { return Single.MinValue; } return value; } } 2. Apply the converter to GridViewDecimalColumn this.radGridView2.Columns["ColumnReal"].DataTypeConverter = new CustomSingleConverter(); this.radGridView2.Columns["ColumnFloat"].DataTypeConverter = new CustomDoubleConverter(); this.radGridView2.Columns["ColumnDecimal"].DataTypeConverter = new CustomDecimalConverter(); this.radGridView2.Columns["ColumnInt"].DataTypeConverter = new CustomIntConverter(); this.radGridView2.Columns["ColumnNumeric"].DataTypeConverter = new CustomDecimalConverter(); this.radGridView2.Columns["ColumnMoney"].DataTypeConverter = new CustomDecimalConverter();
There should be a Enum (Left, Right, None) property of the Expander Column indicating whether the position of the expander column should be left right or none. This would be especially important during pinning activities meaning no matter how many columns are being pinned and repositioned in the pinned area of the grid, it would always remain on the left, right or none.
Steps to reproduce: 1. Add a GridViewDateTimeColumn to a grid. 2. Add rows where one or more rows should contain null as the columns value. 3. Sort the grid by the date time column. WORKAROUND: Create a custom RadGridDateTimeConverter and assign it as the column's date type converter: public class CustomRadGridDateTimeConverter : RadGridDateTimeConverter { public CustomRadGridDateTimeConverter(GridViewDateTimeColumn column) : base(column) { } public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(DateTime) && value == null) { return DateTime.MinValue; } return base.ConvertTo(context, culture, value, destinationType); } } this.radGridView1.Columns["DateTime"].DataTypeConverter = new CustomRadGridDateTimeConverter(this.radGridView1.Columns["DateTime"] as GridViewDateTimeColumn);
To reproduce: Download the attached files. One contains a project with TelerikDataAccess, the other one contains the SQL script to create the database. Before starting the project notice the column with header text "column1". You will see that its expression is as follows: "Player.Person.FirstName+\",\"+Player.Person.LastName". Starting the project at this point will not produce an exception. Change the name of the column to FirstName and start the project, you will see the stack overflow exception.
The horizontal scrollbar of the control does not behave correctly when there are several pinned columns and their width is larger than the visible area of RadGridView.
The RadGridView should not leave its edit mode state, when scrolling is performed.
Workaround: set the data type of the column to null before saving the layout and after loading it set it with the needed type
RadGridView scrolls to the top when copy and paste operations are performed. The grid scrolls to left when there are a lot of columns as well. In addition this is only observed when the cell is not in edit mode. Workaround: public class MyGridBehavior : BaseGridBehavior { public override bool ProcessKey(KeyEventArgs keys) { bool isPaste = false; if (keys.Control && keys.KeyCode == Keys.V && this.GridViewElement.Template.ClipboardCopyMode != GridViewClipboardCopyMode.Disable) { if (!(this.GridViewElement.Template.GridReadOnly || this.GridViewElement.Template.ReadOnly)) { isPaste = true; } } GridTableElement currentTableElement = this.GridViewElement.CurrentView as GridTableElement; int vScroll = currentTableElement.VScrollBar.Value; int hScroll = currentTableElement.HScrollBar.Value; bool result = base.ProcessKey(keys); if (isPaste) { currentTableElement.VScrollBar.Value = vScroll; currentTableElement.HScrollBar.Value = hScroll; } return result; } } this.radGridView1.GridBehavior = new MyGridBehavior();