Workaround: use the API of RadGridView to delete the row
Work Around: 1. Create custom text box editor. public class MyTextBoxEditor : RadTextBoxEditor { private bool isValueChanging = false; private int selectionStart = -1; public MyTextBoxEditor()
RadGridView - current row changes even when canceling the RowValidating event. Code to reproduce: public Form1() { InitializeComponent(); radGridView1.AutoGenerateColumns = false; radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; radGridView1.Columns.Add(new GridViewTextBoxColumn("A", "A")); radGridView1.Columns.Add(new GridViewTextBoxColumn("B", "B")); radGridView1.Columns.Add(new GridViewTextBoxColumn("C", "C")); radGridView1.Rows.Add("A", "AA", "AAA"); radGridView1.Rows.Add("B", "BB", "BBB"); radGridView1.Rows.Add("C", "CC", "CCC"); radGridView1.Rows.Add("D", "DD", "DDD"); radGridView1.Rows.Add("E", "EE", "EEE"); radGridView1.Rows.Add("F", "FF", "FFF"); radGridView1.Rows.Add("G", "GG", "GGG"); radGridView1.RowValidating += new RowValidatingEventHandler(radGridView1_RowValidating); } void radGridView1_RowValidating(object sender, RowValidatingEventArgs e) { if (e.Row.Cells["B"].Value.ToString() == "BB") { e.Cancel = true; } } Steps to reproduce: 1. Go to cell with value "BB" 2. NOT in edit mode press down arrow key 2-3 times 3. Change text to "AA" 4. Press Tab several times Work around: Use custom navigator: radGridView1.GridViewElement.Navigator = new MyGridNavigator(); public class MyGridNavigator : BaseGridNavigator { private static readonly FieldInfo EnumeratorFieldInfo = typeof(BaseGridNavigator).GetField("enumerator", BindingFlags.NonPublic | BindingFlags.Instance); protected GridTraverser enumerator { get { return EnumeratorFieldInfo.GetValue(this) as GridTraverser; } } protected override bool SelectCore(GridViewRowInfo row, GridViewColumn column) { bool result = base.SelectCore(row, column); if (!result) { enumerator.GoToRow(this.GridViewElement.CurrentRow); } return result; } }
FIX. RadGridView - cursor does not work properly, when cursor has value "Cursors.SizeWE" and mouse is moving over GroupPanelElement. Steps to reproduce: 1. On a gridview make sure that a column in grouped. 2. Place your mouse on a column split just below the grouped column. 3. The cursor icon changes to a SizeWE icon to let you know that you can resize the column, This is normal. 4. Now, move the mouse (with the cursor icon = SizeWE) to the grouped column just above. 5. Now the cusor gets stucked with this SizeWE icon and never goes away on this grid. Wathever you do now the icon stays showing as a SizeWE icon. Work Around - create custom grid behavior and override OnMouseMove method. public class CustomGridBehavior : BaseGridBehavior { public override bool OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); GridTableElement table = this.GetGridTableElementAtPoint(e.Location); if (table == null) { this.GridViewElement.ElementTree.Control.Cursor = Cursors.Default; return false; } return false; } }
RadGridView - You cannot select cells only from Pinned Columns if under them there is unpinned one. Steps to reproduce: 1. Set SelectionMode property of RadGridView to GridViewSelectionMode.CellSelect. 2. Create 3 left pinned columns 3. Create several unpinned columns. 4. Scroll horizontal scroll bar to hide several unpinned columns under the pinned. 5. Try to select only pinned cells with the selection rectangle.
You should use the ticket project in order to reproduce the issue.
To reproduce: -add RadGridView with 2 columns - ID and Name; -add RadButton and use the following code: public Form1() { InitializeComponent(); AddSelfReferencingColumns(grid, "Id", "Parent.Id"); this.grid.DataSource = TestDataGenerator.GenerateTestData(); } public void AddSelfReferencingColumns(RadGridView grid, string childKey, string parentKey) { GridViewTextBoxColumn col1 = new GridViewTextBoxColumn("hiddenColumnId", childKey); GridViewTextBoxColumn col2 = new GridViewTextBoxColumn("hiddenColumnParentId", parentKey); grid.MasterTemplate.Columns.Add(col1); grid.MasterTemplate.Columns.Add(col2); grid.Columns["hiddenColumnId"].IsVisible = false; grid.Columns["hiddenColumnParentId"].IsVisible = false; grid.Relations.AddSelfReference(grid.MasterTemplate, "hiddenColumnId", "hiddenColumnParentId"); } void refreshButton_Click(object sender, System.EventArgs e) { this.grid.DataSource = TestDataGenerator.GenerateTestData(); } class TestDataGenerator { public static IList<TestObject> GenerateTestData() { IList<TestObject> result = new List<TestObject>(); TestObject top = new TestObject { Id = 1, Name = "Top" }; result.Add(top); for (int i = 1; i < 4; i++) { TestObject firstChild = new TestObject() { Id = 10 * i, Name = string.Format("First level child {0}", i), Parent = top }; result.Add(firstChild); for (int j = 1; j < 10; j++) { TestObject secondChild = new TestObject() { Id = 10 * i + j, Name = string.Format("Second level child {0}", j), Parent = firstChild }; result.Add(secondChild); } } return result; } } class TestObject { public long Id { get; set; } public string Name { get; set; } public TestObject Parent { get; set; } } Steps to reproduce: 1.Type in Name column filter i.e. "F" 2.Press refresh button. The grid is empty, even though the new list contains the same data (different objects). Workaround: void refreshButton_Click(object sender, System.EventArgs e) { FilterDescriptorCollection filters = new FilterDescriptorCollection(); foreach (FilterDescriptor filterItem in this.grid.FilterDescriptors) { filters.Add(filterItem); } this.grid.DataSource = TestDataGenerator.GenerateTestData(); this.grid.FilterDescriptors.Clear(); foreach (FilterDescriptor filter in filters) { this.grid.FilterDescriptors.Add(filter); } }
To reproduce: For i = 0 To Me.RadGridView1.Columns.Count - 1 Me.RadGridView1.Columns(i).AutoSizeMode = Telerik.WinControls.UI.BestFitColumnMode.HeaderCells
ADD. RadGridView - add support for scrolling the grid while dragging in SelectionMode = CellSelect
A user should be able to disable executing any of the cut/copy/paste (ctrl+x, ctrl+c, ctrl+v) commands.
Steps to reproduce: 1. Add a RadGridView to a form and fill it with data so there would be a vertical scroll bar 2. Set AutoSizeRows to true 3. Run the project and call RadGridView.PrintPreview() method 4. You will see that only the rows that are visible in the RadGirdView or have been scrolled to will have a correct height.
It appears that this scenario is not handled properly in our exporter. Consider the case where you have two templates that use view definition. The view definition from the second template is not exported at all.
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.
Steps to reproduce: 1. Create a form 2. Set its Localization property to true. 3. Add RadGridView to the form 4. Add 3 GridViewTextBoxColumn instances at design-time 5. Change the Language of the form to Polish 6. The variable names of the columns are changed (gridViewTextBoxColumn1 to gridViewTextBoxColumn4, gridViewTextBoxColumn2 to gridViewTextBoxColumn5, gridViewTextBoxColumn3 to gridViewTextBoxColumn6)
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); } }
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.
IMPROVE. RadGridView - add ability to change and customize the font (bold, italic, etc) in the ConditionalFormattingForm