To reproduce: For i = 0 To Me.RadGridView1.Columns.Count - 1 Me.RadGridView1.Columns(i).AutoSizeMode = Telerik.WinControls.UI.BestFitColumnMode.HeaderCells
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); } }
ADD. RadGridView - add support for scrolling the grid while dragging in SelectionMode = CellSelect
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.
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.
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; } }
You should use the ticket project in order to reproduce the issue.
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; } }
Work Around: 1. Create custom text box editor. public class MyTextBoxEditor : RadTextBoxEditor { private bool isValueChanging = false; private int selectionStart = -1; public MyTextBoxEditor()
A user should be able to disable executing any of the cut/copy/paste (ctrl+x, ctrl+c, ctrl+v) commands.
Currently sub-property binding is supported in the MasterTemplate of the grid (level 1). We should make this functionality available in lower levels when users are creating an object relational hierarchy.
FIX. RadGridView - the PropertyName from the arguments of the RowsChanged event is null, while it should display the changed field name
To reproduce: please refer to the attached sample project and gif file illustrating the behavior. Add cell value in the new row and press teh down arrow. Workaround: this.radGridView1.MasterTemplate.SelectLastAddedRow = false; This problem is applicable for OpenEdge as well: http://knowledgebase.progress.com/articles/Article/Telerik-RadGridView-highlights-unnecessary-columns-and-rows-in-batch-mode
The column image setting overrides the local image setting. Work around: void grid_CellFormatting(object sender, CellFormattingEventArgs e) { if (e.CellElement is GridCommandCellElement) { if (e.Column.Name == "stationview") { RadButtonElement element = (RadButtonElement)e.CellElement.Children[0]; element.UnbindProperty(RadButtonElement.ImageProperty); element.Image = img; element.DisplayStyle = DisplayStyle.Image; element.ImageAlignment = ContentAlignment.MiddleCenter; } } }
Add support for the GridViewComboBoxColumn to initialize properly when the BindingList it is bound to is empty.
Workaround: set the data type of the column to null before saving the layout and after loading it set it with the needed type
ADD. RadGridView should support filtering operations when custom TypeConverters are used.
After a couple clicks, grid's context menu becomes unresponsive when using RadGridView through remote connection and Windows 7
The GroupRow Height cannot be changed when ColumnGroupsViewDefinition and HtmlViewDefinition are used.