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.
To reproduce: add a RadGridView and bind it to Employees data table. 1. Group by "Title". 2. Group by "Country". 3. Group by "City". If you try to expand the "Sales Representative" group, no rows will be displayed. Please refer to the attached gif file, illustrating better the obtained behavior.
RadGridView scrolls to right when clicking on a cell that is larger than the visible area.
RadGridView is throwing exception when loading layout that contains a GroupDescriptor with predefined Format with Aggregate function. Steps to reproduce: 1. Add GroupDescriptor: Dim descriptor As New GroupDescriptor descriptor.GroupNames.Add("column3", System.ComponentModel.ListSortDirection.Ascending) descriptor.Aggregates.Add("Sum(column3)") descriptor.Format = "{0}: {1} Total montant : {2:c2}" Me.RadGridView1.GroupDescriptors.Add(descriptor) 2. Save Layout 3. Load Layout
To reproduce: - just subscribe to the event, sort the grid to fire it and check the property value Wordaround: ((SortDescriptor)e.NewItems[0]).PropertyName
The alternating row color in RadGridView does not work when the control is in unbound mode and LoadFrom method is used. Resolution: The issue is duplicated with feedback item FIX. RadGridView - AlternatingRowColor does not work when data is loaded in the RadGridView from a IDataReader Here is the link to item: http://feedback.telerik.com/Project/154/Feedback/Details/112656-fix-radgridview-alternatingrowcolor-does-not-work-when-data-is-loaded-in-the-r
Steps to reproduce: 1. Add a RadGridView to a form. 2. Add a code that would load data in the RadGridView from an IDataReader: radGridView1.MasterTemplate.LoadFrom(iReader); 3. Set EnableAlternatingRowColor to true and set some AlternatingRowColor 4. Run the project and you will see that the alternating row color is not applied.
RadDateTimeEditor the entire date cannot be selected when the editor is initialized.
Setting the custom format is not applied to the cell. To reproduce: Dim customColumn As New GridViewDateTimeColumn() customColumn.Width = 200 customColumn.Name = "custom" customColumn.EditorType = GridViewDateTimeEditorType.TimePicker customColumn.FormatString = "{0:HH:mm}" customColumn.Format = DateTimePickerFormat.Custom customColumn.CustomFormat = "HH:mm" RadGridView1.MasterTemplate.Columns.Add(customColumn) RadGridView1.Rows.Add(DateTime.Now)
To reproduce: Declare the following classes: public class Test { public string Name { get; set; } public Child Child { get; set; } } public class Child { public string ChildName { get; set; } public override string ToString() { return ChildName; } } Add the following columns: gridViewTextBoxColumn1.FieldName = "Name"; gridViewTextBoxColumn1.HeaderText = "column1"; gridViewTextBoxColumn1.Name = "column1"; gridViewTextBoxColumn2.FieldName = "Child"; gridViewTextBoxColumn2.HeaderText = "column2"; gridViewTextBoxColumn2.Name = "column2"; this.radGridView1.MasterTemplate.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] { gridViewTextBoxColumn1, gridViewTextBoxColumn2}); this.radGridView1.Name = "radGridView1"; this.radGridView1.Size = new System.Drawing.Size(429, 176); this.radGridView1.TabIndex = 0; this.radGridView1.Text = "radGridView1"; Bind RadGridView to the following data: var data = new List<Test>(); for (int i = 0; i < 10; i++) { data.Add(new Test { Name = "Name" + i, Child = new Child { ChildName = "Child " + i } }); } Export to Excel: ExportToExcelML excelExporter = new ExportToExcelML(radGridView1); excelExporter.RunExport(System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), @"test.xls")); You will notice that column2 will not have text Workaround: Subscribe to the ExcelCellFormatting event: void excelExporter_ExcelCellFormatting(object sender, Telerik.WinControls.UI.Export.ExcelML.ExcelCellFormattingEventArgs e) { if (e.ExcelCellElement.Data.DataItem.GetType().IsClass) { e.ExcelCellElement.Data.DataItem = e.ExcelCellElement.Data.DataItem.ToString(); } }
Resolution: Please use the following code snippet to replace RadGridViewDragDropService: this.radGridView1.GridViewElement.RegisterService(new CustomDragDropService(this.radGridView1.GridViewElement));
To reproduce: - Create a RadGridView with 3 columns. - Set ShowRowHeaderColumn to false. - Set GridViewAutoSizeColumnsMode to Fill. - Select a cell and hit the TAB key multiple times. Notice the entire grid shift left and right.
This method should return true if successful.
To reproduce: Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load BindGrid() End Sub Private Sub BindGrid() Dim r As New Random() Dim table As New DataTable() table.Columns.Add("ID", GetType(Integer)) table.Columns.Add("Name", GetType(String)) table.Columns.Add("Bool", GetType(Boolean)) For i As Integer = 0 To 39 table.Rows.Add(i, "Row " & i, If(r.[Next](10) > 5, True, False)) Next Me.RadGridView1.DataSource = table End Sub Dim saveName As Integer Private Sub RadGridView1_CellEndEdit(sender As Object, e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles RadGridView1.CellEndEdit If e.Column.Name = "Name" Then saveName = RadGridView1.CurrentRow.Cells("ID").Value BindGrid() End If End Sub Private Sub RadGridView1_DataBindingComplete(sender As Object, e As Telerik.WinControls.UI.GridViewBindingCompleteEventArgs) Handles RadGridView1.DataBindingComplete For Each row As GridViewRowInfo In RadGridView1.Rows If row.Cells("ID").Value = saveName Then row.IsCurrent = True RadGridView1.TableElement.EnsureRowVisible(row) Exit For End If Next End Sub WORKAROUND: Rebind the grid in the CellValueChanged event instead of the CellEndEdit event: Private Sub RadGridView1_CellValueChanged(sender As Object, e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles RadGridView1.CellValueChanged If e.Column.Name = "Name" Then saveName = RadGridView1.CurrentRow.Cells("ID").Value BindGrid() End If End Sub
Currently one cannot set the column chooser items properties permanently since they are recreated every time the chooser is shown or item is added/removed. Resolution: You can subscribe to the ColumnChooserItemElementCreating event and edit the column chooser items.