If one follows the guide from the online documentation to create custom summary cell element he will no be able to use it in a custom column: http://www.telerik.com/help/winforms/gridview-cells-custom-cells.html The issue is that the GetCellType method of the column is never called for summary rows.
To reproduce: bind the grid to self reference data source, and on a button click, Fill the TableAdapter Workaround: clear the relations to clear the cache and add them back after the adapter is filled: RadGridView1.Relations.Clear() Me.Table1TableAdapter.Fill(Me.Database8DataSet.Table1) Me.RadGridView1.Relations.AddSelfReference(Me.RadGridView1.MasterTemplate, "TaskID", "ParentTask")
RadGrid's HierarchyRowTraverser throws an exception when all levels are expanded and filter is applied Please, tests with the attached project.
If your screen scaling is set to 125% the location of the editors that appear in the Composite Filter Form is not correct.
To reproduce, use the following localization provider and set a fitler to a boolean column in RadGridView, via the Custom filtering dialog. class MyRadGridLocalizationProvider : RadGridLocalizationProvider { public const string CustomTrue = "CustomTRUE"; public const string CustomFalse = "CustomFALSE"; public override string GetLocalizedString(string id) { if (id == "CustomFilterDialogTrue") { return CustomTrue; } else if (id == "CustomFilterDialogFalse") { return CustomFalse; } else { return base.GetLocalizedString(id); } } } Workaround - create custom type converter as follows: public class MyBooleanConverter : BooleanConverter { public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) { if (value is string) { string text = Convert.ToString(value); if (text == MyRadGridLocalizationProvider.CustomTrue) { return true; } else if (text == MyRadGridLocalizationProvider.CustomFalse) { return false; } } return base.ConvertFrom(context, culture, value); } } and apply it to the check box column: radGridView1.Columns["BoolColumn"].DataTypeConverter = new MyBooleanConverter();
One should be able to create a relation in order to produce the following hierarchy: public class MainObject { public ObservableCollection<LibraryObject> ListOfLibraryObjects { get; set; } } public class LibraryObject { public string LibraryName { get; set; } public TrajectoryManager TheTrajectoryManager { get; set; } } public class TrajectoryManager { public ObservableCollection<TrajectoryData> ListOfTrajectoryData { get; set; } } public class TrajectoryData { public string Name { get; set; } } WORKAROUND: public class MainObject { public ObservableCollection<LibraryObject> ListOfLibraryObjects; } public class LibraryObject { public string LibraryName { get; set; } public ObservableCollection<TrajectoryData> ListOfTrajectoryData { get; set; } // public TrajectoryManager TheTrajectoryManager; //} //public class TrajectoryManager //{ // public ObservableCollection<TrajectoryData> ListOfTrajectoryData; } public class TrajectoryData { public string Name { get; set; } }
Steps to reproduce: 1. Add a grid to a form 2. Add a self-reference hierarchy data and relation 3. Group the data on a column Enter edit mode for a cell and directly click on the expand/collapse sign of a hierarchy row. You will see that RadGridView does not behave correctly all the time.
Deleting a Template in the Property Builder does work.
Steps to reproduce: 1. Add a grid to a form and add two expression columns 2. Enable Excel-like filtering 3. Add data 4. Run the project and filter on both expression columns You will see an exception.
IMPROVE. RadGridView - add ability to change and customize the font (bold, italic, etc) in the ConditionalFormattingForm
Currently, it is only possible to define two filter conditions in the Custom Filter Dialog. It would be better if there is possibility for adding multiple filter conditions, similar to the possibility given by the Conditional Formatting Dialog
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
1. Create a new project with RadGridView. 2. Bind it and set grouping. 3. Add a summary row and set ShowParentGroupSummaries property to true. 4. Handle the ViewCellFormatting event and set all summary rows to be IsVisible = false when the processed cell is GridSummaryCellElement: void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) { if (e.CellElement is GridSummaryCellElement) { e.Row.IsVisible = false; } } CORRECT WAY TO HANDLE THIS CASE: Hide the summary rows in the groups you want after grouping/data binding. To hide the first bottom summary row of the first group in a RadGridView use the following code: this.radGridView1.Groups[0].GroupRow.BottomSummaryRows[0].IsVisible = false;
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; } }
The RadGridView is bound to DataView Workaround: add row using the DataTable API: private void radButton1_Click(object sender, EventArgs e) { DataRow row = m_dvMat.Table.NewRow(); row["Active"] = true; row["Category"] = form.m_sString; m_dvMat.Table.Rows.Add(row); }
If you end edit of sorted decimal column by pressing ENTER key, the StackOverflowException is thrown.
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
Presently it is not possible to persist customer created formatting objects in RadGridView.
1. Create a new project with RadGridView and bind it. 2. Add a GridViewComboBoxColumn and bind it to a generic list that contains KeyValuePair instancess. Set the key to be an enum and set the ValueMember property of the column to point to this field. 3. Run the project and try to filter by this column.
To reproduce: - Set BeginEditMod to BeginEditProgrammatically - Check/uncheck a check box cell and you will be able to edit the rest of the cells