To reproduce: Download the attached project and expand the first row. Collapse it and expand the second row. You will see that both rows will be expanded. Workaround: void radGridView1_ChildViewExpanding(object sender, ChildViewExpandingEventArgs e) { Point p = this.radGridView1.PointToClient(MousePosition); RadElement el = this.radGridView1.ElementTree.GetElementAtPoint(p); if (el != null) { GridRowElement rowElement = el.FindAncestor<GridRowElement>(); if (rowElement != null && e.ParentRow.Index != rowElement.RowInfo.Index && !e.IsExpanded) { e.Cancel = true; } } }
To reproduce: Set these properties: radGridView1.SelectionMode = GridViewSelectionMode.FullRowSelect; radGridView1.MultiSelect = true; Select a row, hold Ctrl and click the same cell which is selected, you will see that the SelectionChanging event, along with the SelectionChanged one will not be fired. Workaround: Use the PropertyChanging event of the rows: this.Grid.Rows.ToList().ForEach(x => x.PropertyChanging += x_PropertyChanging); .... void x_PropertyChanging(object sender, Telerik.WinControls.Interfaces.PropertyChangingEventArgsEx e) { if (e.PropertyName == "IsSelected") { } }
This happened multiple times. In the property builder, I tried to delete the column and Visual Studio crashed. I was able to delete other columns fine, but this particular column caused a problem. The only difference that I can see between the other columns and the one that caused the problem was the conditionalformattingobject. Once I deleted this conditionalformattingobject, I was able to delete the column without any problem.
To reproduce: - Type &1 in a grid cell and then press enter to exit edit mode. - Press tab for example to move to the next cell. - Press 1 again you will notice that the digit does not appear in the cell.
To reproduce: use the following code snippet: public Form1() { InitializeComponent(); GridViewComboBoxColumn supplierColumn = new GridViewComboBoxColumn("SupplierID"); supplierColumn.DataSource = this.suppliersBindingSource; supplierColumn.ValueMember = "SupplierID"; supplierColumn.DisplayMember = "ContactName"; supplierColumn.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown; this.radGridView1.Columns.Add(supplierColumn); this.radGridView1.CellEditorInitialized += radGridView1_CellEditorInitialized; } private void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e) { RadDropDownListEditor editor = e.ActiveEditor as RadDropDownListEditor; if (editor != null) { RadDropDownListEditorElement el = editor.EditorElement as RadDropDownListEditorElement; el.SelectedIndexChanging -= el_SelectedIndexChanging; el.SelectedIndexChanging += el_SelectedIndexChanging; el.SelectedIndexChanged -= el_SelectedIndexChanged; el.SelectedIndexChanged += el_SelectedIndexChanged; } } private void el_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e) { Console.WriteLine("Changed"); } private void el_SelectedIndexChanging(object sender, Telerik.WinControls.UI.Data.PositionChangingCancelEventArgs e) { e.Cancel = true; } private void Form1_Load(object sender, EventArgs e) { this.suppliersTableAdapter.Fill(this.nwindDataSet.Suppliers); } When the editor is initialized you will notice that the editor's value can be changed by using the mouse wheel no matter that the SelectedIndexChanging event is cancelled.
To reproduce: 1.Add a RadGridView and add twelve columns at design time. 2.Enable filtering and use the following code: public Form1() { InitializeComponent(); radGridView1.MasterTemplate.MultiSelect = true; } private void Form1_Load(object sender, EventArgs e) { foreach (var column in radGridView1.Columns) { column.Width = 100; } } 3.When you run the application, click over the filtering cell for the 3rd column. Type in some text and click the filter button. As a result the horizontal scroll bar is positioned at right most. Workaround: radGridView1.MouseDown += radGridView1_MouseDown; radGridView1.TableElement.HScrollBar.ValueChanged += HScrollBar_ValueChanged; int scrollBarValue = 0; bool shouldResetValue = false; private void radGridView1_MouseDown(object sender, MouseEventArgs e) { RadElement clickecElement = this.radGridView1.ElementTree.GetElementAtPoint(e.Location); GridFilterRowElement filterRowElement = clickecElement.FindAncestor<GridFilterRowElement>(); GridNewRowElement newRowElement = clickecElement.FindAncestor<GridNewRowElement>(); if (clickecElement is GridFilterRowElement || clickecElement is GridNewRowElement || filterRowElement != null || newRowElement != null) { shouldResetValue = true; } else { shouldResetValue = false; } scrollBarValue = this.radGridView1.TableElement.HScrollBar.Value; } private void HScrollBar_ValueChanged(object sender, EventArgs e) { if (shouldResetValue) { this.radGridView1.TableElement.HScrollBar.Value = scrollBarValue; } }
Workaround: private void radGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e) { GridBrowseEditor browseEditor = e.ActiveEditor as GridBrowseEditor; if (browseEditor!=null) { browseEditor.EditorElement.MinSize = new Size(0,18); GridBrowseEditorElement el = browseEditor.EditorElement as GridBrowseEditorElement; el.TextBoxItem.TextBoxControl.MinimumSize = new Size(0, 13); } }
This is not considered an issue, it is how RadGridView works. Here are more details: In order for a GridDetailViewCellElement to display a pageview instead of a single table element, either the template of the row holding it has to have more than one child template, or its ShowChildViewCaptions should be true. Once there is a page view, the tabs in it will be visible at all times, except when some of the templates has no rows and AllowAddNewRow for it is false – if it does not have any rows and the user cannot add row, it is considered that there is no need from it. If one needs to change the visibility of the tabs, this can be done in the ViewCellFormatting event: private void RadGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) { GridDetailViewCellElement detailCell = e.CellElement as GridDetailViewCellElement; if (detailCell != null) { foreach (RadPageViewItem item in detailCell.PageViewElement.Items) { item.Visibility = Telerik.WinControls.ElementVisibility.Visible; } } }
To reproduce: add a RadGridView with many columns so the horizontal scroll bar will be shown. Start navigating by pressing the right arrow key. You will notice that when you reach the last visible column in the current view, navigating to the next column changes the whole view and the current column is displayed at the beginning of the view. The expected behavior is that after pressing the right arrow key the horizontal scroll bar will move only one column forward.
To reproduce: - Bind the grid to an ObservableCollection and set its AddNewBoundRowBeforeEdit property to true. - Click in the new row and then click back in already added row.
To reproduce: Add a RadGridView and set the Form.UseWaitCursor property to true. When the cursor is positioned inside the RadGridView the cursor is set back to default. Workaround: public RadForm1() { InitializeComponent(); radGridView1.GridBehavior = new CustomRowBehavior(); } public class CustomRowBehavior : BaseGridBehavior { public override bool OnMouseMove(MouseEventArgs e) { Cursor cursor = this.GridControl.Cursor; bool result = base.OnMouseMove(e); this.GridControl.Cursor = cursor; return result; } }
To reproduce: - Set EnterKeyMode to EnterMovesToNextRow. - Enter an invalid value in the first cell and press enter two times. - Enter valid value and press enter again. - You will notice that the current row is moved appropriately.
To reproduce: 1. Add RadGridView with 2 columns 2. Sort first column. Then sort second column. 3. Break in the SortChanged event handler method 4. e.NewItems[0].PropertyName is 'column1' and e.OldItems[0].PropertyName is 'column2', the values are swapped
Let's say that we have the following scenario: the end-user clicks the checkbox editor of RadGridView. The developer might want to commit the value in the corresponding cell right after the end-user clicks the checkbox and it also might be required that the edit mode is ended. Currently, you can commit a value in the cell, but you can't end the edit mode of RadGridView.
FIX. RadGridView ComboBoxColumn when in data bound mode with auto complete set to SuggestAppend wrong results might be obtained. How to reporduce: Use RadGridView with ComboBoxColumn and set AutoCompleteMode to SuggestAppend. Also set DropDownStyle to DropDown. When start typing if nonexisting item gets typed the column will append the closest available item to the cell.
Add support for the GridViewComboBoxColumn to initialize properly when the BindingList it is bound to is empty.
To reproduce: Add a row to RadGridView and select it. Then remove it from the rows. Check the SelectedRows collection and you will see that the row is inside. The collection should not contain removed rows and the SelectionChanged event should be fired when a selected row is removed. Workaround: Set the IsSelected property of the row to false prior removing it.
To reproduce: add a RadGridView and bind it to Employees data table. Use the following code snippet: Me.RadGridView1.EnableGrouping = True Me.RadGridView1.EnableFiltering = True Dim summaryItem As New GridViewSummaryItem() summaryItem.Name = "Address" summaryItem.Aggregate = GridAggregateFunction.Count Dim summaryRowItem As New GridViewSummaryRowItem() summaryRowItem.Add(summaryItem) Me.RadGridView1.SummaryRowsTop.Add(summaryRowItem) Me.RadGridView1.MasterTemplate.ShowParentGroupSummaries = True 1. Group by "Title" and expand "Sales Representative" group. 2. Group by "Country" and "City". 3.Expand "Sales Representative" group >> "UK" sub-group >> "London" sub-group. You will notice that the summary row shows "3", because you actually have 3 employees in "London" group. 4.Filter by "FirstName" (Contains: "a" for example). As a result 2 employess will remain in "London" group, but the summary row will continue displaying "3". The attached gif file illustrates better the described behavior. Workaround: in the FilterChanged event store the applied GroupDescriptors, clear the RadGridView.GroupDescriptors collection, and add again the stored descriptors. Note that it is necessary to store the expanded groups and restore their state as well.