To reproduce: Add page view, add a tab, add a grid, dispose the controls inside the tab on its removing event. Exception may occur.
To reproduce use this code: public partial class Form1 : Form { RadGridView radGridView1 = new RadGridView(); public Form1() { InitializeComponent(); this.Controls.Add(this.radGridView1); this.radGridView1.Dock = DockStyle.Fill; this.radGridView1.AutoGenerateColumns = false; this.radGridView1.TableElement.RowHeight = 30; this.radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; this.radGridView1.AddNewRowPosition = SystemRowPosition.Bottom; this.radGridView1.EnterKeyMode = RadGridViewEnterKeyMode.EnterMovesToNextCell; this.radGridView1.NewRowEnterKeyMode = RadGridViewNewRowEnterKeyMode.EnterMovesToNextCell; this.radGridView1.BeginEditMode = Telerik.WinControls.RadGridViewBeginEditMode.BeginEditOnKeystrokeOrF2; this.radGridView1.EnableGrouping = false; this.radGridView1.EnableAlternatingRowColor = true; this.radGridView1.AllowAddNewRow = true; this.radGridView1.AllowEditRow = true; this.radGridView1.AllowDeleteRow = true; this.radGridView1.EnableFiltering = true; this.radGridView1.EnableSorting = true; ArrayList arrayList = new ArrayList(); arrayList.Add(new Person() { Name = "Jack", Family = "J..." }); arrayList.Add(new Person() { Name = "Bob", Family = "B..." }); arrayList.Add(new Person() { Name = "Dani", Family = "D..." }); radGridView1.Columns.Add("ColName", "Name", "Name"); radGridView1.Columns.Add("ColFamily", "Family", "Family"); radGridView1.DataSource = arrayList; this.radGridView1.CellValidating +=radGridView1_CellValidating; } private void radGridView1_CellValidating(object sender, CellValidatingEventArgs e) { GridViewDataColumn column = e.Column as GridViewDataColumn; if ((e.Row is GridViewDataRowInfo || e.Row is GridViewNewRowInfo) && column != null && (column.Name == "ColName")) { if (e.Value == null || ((string)e.Value).Trim() == "") if (string.IsNullOrEmpty ((string)e.Value) || ((string)e.Value).Trim() == string.Empty || string.IsNullOrWhiteSpace ((string)e.Value)) { if (e.ActiveEditor != null) { MessageBox.Show("Please enter your name"); e.Cancel = true; } } } } } public class Person { private string name; private string family; public string Name { get { return name; } set { name = value; } } public string Family { get { return family; } set { family = value; } } } Try to add a new row by clicking the cell of the first column and leaving it empty. You will see the messagebox twice. Workaround: public class MyGridRowBehavior : GridNewRowBehavior { protected override bool ProcessEnterKey(KeyEventArgs keys) { GridViewNewRowInfo newRowInfo = (GridViewNewRowInfo)this.GridViewElement.CurrentRow; if (this.GridViewElement.NewRowEnterKeyMode == RadGridViewNewRowEnterKeyMode.EnterMovesToNextCell) { bool editorClosed = !this.IsInEditMode; if (this.IsInEditMode) { if (this.IsOnLastCell()) { if (newRowInfo != null) { newRowInfo.GetType().GetMethod("DeferUserAddedRow", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(newRowInfo, null); } editorClosed = GridViewElement.EndEdit(); } else { editorClosed = GridViewElement.CloseEditor(); } } if (editorClosed) { this.Navigator.SelectNextColumn(); this.GridViewElement.BeginEdit(); } if (this.IsInEditMode && this.GridViewElement.CurrentRow is GridViewNewRowInfo && this.GridViewElement.BeginEditMode != RadGridViewBeginEditMode.BeginEditProgrammatically) { return this.GridViewElement.BeginEdit(); } if (newRowInfo != null) { newRowInfo.GetType().GetMethod("RaiseUserAddedRow", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(newRowInfo, null); } return false; } return base.ProcessEnterKey(keys); } } ((BaseGridBehavior)this.radGridView1.GridBehavior).UnregisterBehavior(typeof(GridViewNewRowInfo)); ((BaseGridBehavior)this.radGridView1.GridBehavior).RegisterBehavior(typeof(GridViewNewRowInfo), new MyGridRowBehavior());
To reproduce: void grid_RowValidating(object sender, RowValidatingEventArgs e) { e.Cancel = true; } Pressing the escape key should cancel the edit mode and revert the value
To reproduce: this.grid.Columns.Add(new GridViewDecimalColumn("col")); for (int i = 0; i < 5; i++) { this.grid.Rows.Add(i); } GridViewSummaryItem stDev = new GridViewSummaryItem() { Name = "col", Aggregate = GridAggregateFunction.Var // or GridAggregateFunction.StDev }; var row = new GridViewSummaryRowItem(); row.Add(stDev); this.grid.SummaryRowsTop.Add(row); This will throw an exception.
There should be a convenient and more straightforward API for accessing the TableElement of a child gridview. Currently, the API is: void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) { if (e.CellElement is GridDetailViewCellElement) { ((GridDetailViewCellElement)e.CellElement).ChildTableElement.RowHeight = 50; } }
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.
To reproduce: - Add CommandColumn to the grid - Observe the size of the button in the newrow row Workaround: - Add some padding in the cell formating event void radGridView1_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e) { GridViewNewRowInfo row = e.Row as GridViewNewRowInfo; GridCommandCellElement cell = e.CellElement as GridCommandCellElement; if (row != null && cell != null) { cell.CommandButton.SetDefaultValueOverride(RadItem.MarginProperty, new System.Windows.Forms.Padding(0,0,1,0)); } }
To reproduce: - Create a GridViewMaskBoxColumn with standard mask type and mask set to "aaaaaaaaaa". - Bind the grid to the following DataTable: private static DataTable GridDataTable() { DataRow dr = default(DataRow); DataTable dt = new DataTable(); dt.Columns.Add("Description"); dr = dt.NewRow(); dr[0] = "1234567890"; dt.Rows.Add(dr); dr = dt.NewRow(); dr[0] = "abc"; dt.Rows.Add(dr); return dt; } - Click the first cell in order to enter in edit mode. - Click the second cell and you will notice that the text is wrong. Workaround: - change the value in the CellEditor intialized event handler: void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e) { if (e.ActiveEditor is RadMaskedEditBoxEditor) { RadMaskedEditBoxEditor editor = e.ActiveEditor as RadMaskedEditBoxEditor; editor.MaskTextBox.Value = "___________"; editor.MaskTextBox.Value = (string)radGridView1.CurrentCell.Value; } }
To reproduce: Create a project with RadGridView, add some rows, make sure you have space to perform panning. Pan up and down, exception should occur. Workaround : radgridView1.ViewDefinition = new MyTableViewDefinition(); public class MyTableViewDefinition : TableViewDefinition { public override IRowView CreateViewUIElement(GridViewInfo viewInfo) { return new MyGridTableElement(); } } public class MyGridTableElement : GridTableElement { protected override void OnPanGesture(Telerik.WinControls.PanGestureEventArgs args) { //base.OnPanGesture(args) -> you can stop touch support by also not calling the base and leaving this method empty if (args.IsBegin && (this.RowScroller.Scrollbar.ControlBoundingRectangle.Contains(args.Location) || this.ColumnScroller.Scrollbar.ControlBoundingRectangle.Contains(args.Location) || this.ViewElement.TopPinnedRows.ControlBoundingRectangle.Contains(args.Location))) { return; } bool containsCurrent = (this.GridViewElement.CurrentRow == null && this.GridViewElement.Template == this.ViewTemplate); if (!containsCurrent) { foreach (IRowView child in this.GridViewElement.GetRowViews(this.GridViewElement.CurrentRow.ViewInfo)) { containsCurrent |= (child == this); } } if (!containsCurrent) { return; } this.GridViewElement.EndEdit(); int newVerticalValue = this.RowScroller.Scrollbar.Value - args.Offset.Height; if (newVerticalValue > this.RowScroller.Scrollbar.Maximum - this.RowScroller.Scrollbar.LargeChange + 1) { newVerticalValue = this.RowScroller.Scrollbar.Maximum - this.RowScroller.Scrollbar.LargeChange + 1; } if (newVerticalValue < this.RowScroller.Scrollbar.Minimum) { newVerticalValue = this.RowScroller.Scrollbar.Minimum; } RadScrollBarElement rowScrollbar = this.RowScroller.Scrollbar; if (newVerticalValue > rowScrollbar.Maximum) { newVerticalValue = rowScrollbar.Maximum; } else if (newVerticalValue < 0) { newVerticalValue = 0; } this.RowScroller.Scrollbar.Value = newVerticalValue; int newHorizontalValue = this.ColumnScroller.Scrollbar.Value - args.Offset.Width; if (newHorizontalValue > this.ColumnScroller.Scrollbar.Maximum - this.ColumnScroller.Scrollbar.LargeChange + 1) { newHorizontalValue = this.ColumnScroller.Scrollbar.Maximum - this.ColumnScroller.Scrollbar.LargeChange + 1; } if (newHorizontalValue < this.ColumnScroller.Scrollbar.Minimum) { newHorizontalValue = this.ColumnScroller.Scrollbar.Minimum; } RadScrollBarElement columnScrollBar = this.ColumnScroller.Scrollbar; if (newHorizontalValue > columnScrollBar.Maximum) { newHorizontalValue = columnScrollBar.Maximum; } else if (newHorizontalValue < 0) { newHorizontalValue = 0; } this.ColumnScroller.Scrollbar.Value = newHorizontalValue; args.Handled = true; } }
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.
RadGridView If FilteringMode is set to DisplayMember if one clicks in the ComboBoxColumn cell; the actual cell value goes blank. If FilteringMode is set to ValueMember the ComboBoxColumn behaves as expected. Workaround: Private Sub RadGridView1_CellEditorInitialized(sender As Object, e As GridViewCellEventArgs) Handles RadGridView1.CellEditorInitialized If e.ActiveEditor.GetType() Is GetType(RadDropDownListEditor) Then e.ActiveEditor.Value = e.Value End If End Sub
Steps to reproduce: 1. Add two classes to the project: public class ParentClass { public int MyProperty { get; set; } public List<ChildClass> Children { get; set; } } public class ChildClass { public int MyProperty { get; set; } public SomeEnum Enumera { get; set; } } public enum SomeEnum { first, second, third } 2. Add two RadGridViews to a form. 3. Add two binding sources one with DataSource the ParentClass, the second with DataSource the first binding source and DataMember "Children" 4. Bind the grids to the two data sources. 5. Edit some column properties of the grid bound to the second data source. 6. Build the project and try to open the smart tag of the grid. Some times you will see a message box with text "Object does not match target type."
To reproduce: - Use the code below on a new grid with 3 combo box columns - computer_id, computer_des, location_id public static DataTable dsComputerImages = null; public static DataTable dsLocations = null; private void loadComputerImagesGrid() { dsLocations = new DataTable(); DataColumn newColumn = new DataColumn("location_id", typeof(Int64)); dsLocations.Columns.Add(newColumn); newColumn = new DataColumn("location_des", typeof(String)); dsLocations.Columns.Add(newColumn); DataRow newRow = dsLocations.NewRow(); newRow["location_id"] = 1; newRow["location_des"] = "Boston"; dsLocations.Rows.Add(newRow); newRow = dsLocations.NewRow(); newRow["location_id"] = 2; newRow["location_des"] = "New York"; dsLocations.Rows.Add(newRow); newRow = dsLocations.NewRow(); newRow["location_id"] = 3; newRow["location_des"] = "Huston"; dsLocations.Rows.Add(newRow); dsComputerImages = new DataTable(); newColumn = new DataColumn("computer_id", typeof(Int64)); dsComputerImages.Columns.Add(newColumn); newColumn = new DataColumn("computer_des", typeof(String)); dsComputerImages.Columns.Add(newColumn); newColumn = new DataColumn("location_id", typeof(Int64)); dsComputerImages.Columns.Add(newColumn); newRow = dsComputerImages.NewRow(); newRow["computer_id"] = 1; newRow["computer_des"] = "AAA"; newRow["location_id"] = "1"; dsComputerImages.Rows.Add(newRow); newRow = dsComputerImages.NewRow(); newRow["computer_id"] = 2; newRow["computer_des"] = "BBB"; newRow["location_id"] = "1"; dsComputerImages.Rows.Add(newRow); newRow = dsComputerImages.NewRow(); newRow["computer_id"] = 3; newRow["computer_des"] = "CCC"; newRow["location_id"] = "2"; dsComputerImages.Rows.Add(newRow); newRow = dsComputerImages.NewRow(); newRow["computer_id"] = 4; newRow["computer_des"] = "DDD"; newRow["location_id"] = "3"; dsComputerImages.Rows.Add(newRow); this.ComputerImagesGrid.AutoGenerateColumns = false; this.ComputerImagesGrid.DataSource = dsComputerImages; this.ComputerImagesGrid.AutoSizeRows = true; } private void ComputerImagesGrid_DataBindingComplete(object sender, GridViewBindingCompleteEventArgs e) { ((GridViewComboBoxColumn)((RadGridView)sender).Columns["location_id"]).DataSource = dsLocations; ((GridViewComboBoxColumn)((RadGridView)sender).Columns["location_id"]).ValueMember = "location_id"; ((GridViewComboBoxColumn)((RadGridView)sender).Columns["location_id"]).DisplayMember = "location_des"; ((GridViewComboBoxColumn)((RadGridView)sender).Columns["location_id"]).DisplayMemberSort = true; }
Description: CustomFiltering event does not fire for a RadGridView with Self-Referencing Hierarchy To reproduce: - add RadGridView to a form - EnableCustomFiltering=true and EnableFiltering=true - AddSelfReference Workaround: - First AddSelfReference and bind the grid - Second EnableCustomFiltering=true and EnableFiltering=true
RADGRIDVIEW Extend it with the following localization string ids: – RadGridStringId.FilterMenuSelectionTrue – RadGridStringId.FilterMenuSelectionFalse Resolution: The mentioned strings are not predefined strings within RadGridView. They come from the values of the column being filtered (e.g. if the column is a checkbox column, all values are either True or False). Therefore, to localize them, you need to use a ValueConverter and override the conversion to string: this.radGridView1.Columns[3].DataTypeConverter = new MyConverter(); class MyConverter : BooleanConverter { public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(string)) { if (Object.Equals(value, "True") || (value is bool && (bool)value)) return "Yes"; if (Object.Equals(value, "False") || (value is bool && !(bool)value)) return "No"; } return base.ConvertTo(context, culture, value, destinationType); } }
To reproduce: Create a project with RadGridView, add some rows, make sure you have space to perform panning. Exception should occur. Workaround: this.myGridView.ViewDefinition = new MyTableViewDefinition(); public class MyTableViewDefinition : TableViewDefinition { public override IRowView CreateViewUIElement(GridViewInfo viewInfo) { return new MyGridTableElement(); } } public class MyGridTableElement : GridTableElement { protected override void OnPanGesture(Telerik.WinControls.PanGestureEventArgs args) { if (args.IsBegin && (this.RowScroller.Scrollbar.ControlBoundingRectangle.Contains(args.Location) || this.ColumnScroller.Scrollbar.ControlBoundingRectangle.Contains(args.Location) || this.ViewElement.TopPinnedRows.ControlBoundingRectangle.Contains(args.Location))) { return; } bool containsCurrent = (this.GridViewElement.CurrentRow == null && this.GridViewElement.Template == this.ViewTemplate); if (!containsCurrent) { foreach (IRowView child in this.GridViewElement.GetRowViews(this.GridViewElement.CurrentRow.ViewInfo)) { containsCurrent |= (child == this); } } if (!containsCurrent) { return; } this.GridViewElement.EndEdit(); int newVerticalValue = this.RowScroller.Scrollbar.Value - args.Offset.Height; if (newVerticalValue > this.RowScroller.Scrollbar.Maximum - this.RowScroller.Scrollbar.LargeChange + 1) { newVerticalValue = this.RowScroller.Scrollbar.Maximum - this.RowScroller.Scrollbar.LargeChange + 1; } if (newVerticalValue < this.RowScroller.Scrollbar.Minimum) { newVerticalValue = this.RowScroller.Scrollbar.Minimum; } this.RowScroller.Scrollbar.Value = newVerticalValue; int newHorizontalValue = this.ColumnScroller.Scrollbar.Value - args.Offset.Width; if (newHorizontalValue > this.ColumnScroller.Scrollbar.Maximum - this.ColumnScroller.Scrollbar.LargeChange + 1) { newHorizontalValue = this.ColumnScroller.Scrollbar.Maximum - this.ColumnScroller.Scrollbar.LargeChange + 1; } if (newHorizontalValue < this.ColumnScroller.Scrollbar.Minimum) { newHorizontalValue = this.ColumnScroller.Scrollbar.Minimum; } RadScrollBarElement scrollbar = this.ColumnScroller.Scrollbar; if (newHorizontalValue > scrollbar.Maximum) { newHorizontalValue = scrollbar.Maximum; } else if (newHorizontalValue < 0) { newHorizontalValue = 0; } this.ColumnScroller.Scrollbar.Value = newHorizontalValue; args.Handled = true; } }
To reproduce: Generate the hierarchy with the following code: radGridView1.SelectionMode = GridViewSelectionMode.CellSelect; radGridView1.MultiSelect = true; radGridView1.ClipboardCopyMode = GridViewClipboardCopyMode.EnableWithoutHeaderText; radGridView1.ClipboardPasteMode = GridViewClipboardPasteMode.Enable; radGridView1.AutoGenerateColumns = true; radGridView1.CellValueChanged += grid_CellValueChanged; //radGridView1.ViewCellFormatting += GridCellFormatting; //radGridView1.RowFormatting += grid_RowFormatting; radGridView1.EnableSorting = true; //radGridView1.MasterTemplate.EnableCustomSorting = true; radGridView1.AllowMultiColumnSorting = true; radGridView1.ShowGroupPanel = true; radGridView1.EnableFiltering = true; radGridView1.ShowFilteringRow = false; radGridView1.MasterTemplate.ShowHeaderCellButtons = true; DataTable dt1 = new DataTable(); dt1.Columns.Add("Column1"); dt1.Columns.Add("Column2"); dt1.Columns.Add("Column3"); dt1.Columns.Add("Column4"); dt1.Columns.Add("Column5"); dt1.Columns.Add("Column6"); dt1.Columns.Add("Column7"); dt1.Columns.Add("Column8"); dt1.Columns.Add("Column9"); dt1.Columns.Add("Column10"); DataTable dt2 = new DataTable(); dt2.Columns.Add("Column1"); dt2.Columns.Add("Column2"); dt2.Columns.Add("Column3"); dt2.Columns.Add("Column4"); dt2.Columns.Add("Column5"); dt2.Columns.Add("Column6"); dt2.Columns.Add("Column7"); dt2.Columns.Add("Column8"); dt2.Columns.Add("Column9"); var temp = new GridViewTemplate(); temp.AutoGenerateColumns = true; radGridView1.Templates.Add(temp); var rel = new GridViewRelation(radGridView1.MasterTemplate, temp); rel.ChildColumnNames.Add("Column1"); rel.ParentColumnNames.Add("Column1"); radGridView1.Relations.Add(rel); radGridView1.MasterTemplate.DataSource = dt1; dt1.Rows.Add(1, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt1.Rows.Add(2, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt1.Rows.Add(3, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt1.Rows.Add(4, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt1.Rows.Add(5, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt2.Rows.Add(1, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); dt2.Rows.Add(1, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); dt2.Rows.Add(1, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); dt2.Rows.Add(2, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); dt2.Rows.Add(2, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); temp.DataSource = dt2; 1. Run the project with the generated hierarchy 2. Select second cell in first row. 3. Expand first row and select 3 cells in fifth column by mouse drag 4. Right click on selection and "Copy" or press Ctrl+C. 5. Try to Paste the data into 7-th column. 6. The data is pasted in the second column
To reproduce: Generate the hierarchy with the following code: radGridView1.SelectionMode = GridViewSelectionMode.CellSelect; radGridView1.MultiSelect = true; radGridView1.ClipboardCopyMode = GridViewClipboardCopyMode.EnableWithoutHeaderText; radGridView1.ClipboardPasteMode = GridViewClipboardPasteMode.Enable; radGridView1.AutoGenerateColumns = true; radGridView1.CellValueChanged += grid_CellValueChanged; //radGridView1.ViewCellFormatting += GridCellFormatting; //radGridView1.RowFormatting += grid_RowFormatting; radGridView1.EnableSorting = true; //radGridView1.MasterTemplate.EnableCustomSorting = true; radGridView1.AllowMultiColumnSorting = true; radGridView1.ShowGroupPanel = true; radGridView1.EnableFiltering = true; radGridView1.ShowFilteringRow = false; radGridView1.MasterTemplate.ShowHeaderCellButtons = true; DataTable dt1 = new DataTable(); dt1.Columns.Add("Column1"); dt1.Columns.Add("Column2"); dt1.Columns.Add("Column3"); dt1.Columns.Add("Column4"); dt1.Columns.Add("Column5"); dt1.Columns.Add("Column6"); dt1.Columns.Add("Column7"); dt1.Columns.Add("Column8"); dt1.Columns.Add("Column9"); dt1.Columns.Add("Column10"); DataTable dt2 = new DataTable(); dt2.Columns.Add("Column1"); dt2.Columns.Add("Column2"); dt2.Columns.Add("Column3"); dt2.Columns.Add("Column4"); dt2.Columns.Add("Column5"); dt2.Columns.Add("Column6"); dt2.Columns.Add("Column7"); dt2.Columns.Add("Column8"); dt2.Columns.Add("Column9"); var temp = new GridViewTemplate(); temp.AutoGenerateColumns = true; radGridView1.Templates.Add(temp); var rel = new GridViewRelation(radGridView1.MasterTemplate, temp); rel.ChildColumnNames.Add("Column1"); rel.ParentColumnNames.Add("Column1"); radGridView1.Relations.Add(rel); radGridView1.MasterTemplate.DataSource = dt1; dt1.Rows.Add(1, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt1.Rows.Add(2, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt1.Rows.Add(3, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt1.Rows.Add(4, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt1.Rows.Add(5, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt2.Rows.Add(1, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); dt2.Rows.Add(1, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); dt2.Rows.Add(1, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); dt2.Rows.Add(2, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); dt2.Rows.Add(2, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); temp.DataSource = dt2; 1. Run the project with the generated hierarchy 2. Select Last cell in first row. (there is no "Column9" in Child Template) 3. Expand first row and select any cell in first child row. 4. Hold Shift-Key and press down arrow or up arrow until you receive a NullReferenceException.
To reproduce: - generate the hierarchy using the following code: radGridView1.SelectionMode = GridViewSelectionMode.CellSelect; radGridView1.MultiSelect = true; radGridView1.ClipboardCopyMode = GridViewClipboardCopyMode.EnableWithoutHeaderText; radGridView1.ClipboardPasteMode = GridViewClipboardPasteMode.Enable; radGridView1.AutoGenerateColumns = true; radGridView1.CellValueChanged += grid_CellValueChanged; radGridView1.EnableSorting = true; radGridView1.AllowMultiColumnSorting = true; radGridView1.ShowGroupPanel = true; radGridView1.EnableFiltering = true; radGridView1.ShowFilteringRow = false; radGridView1.MasterTemplate.ShowHeaderCellButtons = true; DataTable dt1 = new DataTable(); DataTable dt2 = new DataTable(); for (int i = 0; i < 10; i++) { dt1.Columns.Add("Column" + i); dt2.Columns.Add("Column" + i); } var temp = new GridViewTemplate(); temp.AutoGenerateColumns = true; radGridView1.Templates.Add(temp); var rel = new GridViewRelation(radGridView1.MasterTemplate, temp); rel.ChildColumnNames.Add("Column1"); rel.ParentColumnNames.Add("Column1"); radGridView1.Relations.Add(rel); radGridView1.MasterTemplate.DataSource = dt1; dt1.Rows.Add(1, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt1.Rows.Add(2, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt1.Rows.Add(3, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt1.Rows.Add(4, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt1.Rows.Add(5, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6, 9); dt2.Rows.Add(1, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); dt2.Rows.Add(1, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); dt2.Rows.Add(1, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); dt2.Rows.Add(2, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); dt2.Rows.Add(2, "sdf", "sdfsfqwert", 1, 2, 3, 4, 7, 6); temp.DataSource = dt2; 1. Run the project with the generated hierarchy 2. Select second cell in first row. 3. Expand first row and select fifth cell in first child row. 4. Hold Shift-Key and press down arrow after that right arrow twice. selection will be incorrect
Description: When we scroll the RadGridView from Top to Bottom and Bottom to Top the first record is cut off, if we click the refresh button then it will be displayed properly. To reproduce: - add a RadGridView to a form - add a RadButton to a form - use the following code snippet: public Form1() { InitializeComponent(); radGridView1.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.None; radGridView1.EnableCustomFiltering = false; this.radGridView1.AutoSizeRows = true; radGridView1.Columns["CustomerID"].Width = 100; radGridView1.Columns["CompanyName"].Width = 150; radGridView1.Columns["ContactName"].Width = 150; radGridView1.Columns["Country"].Width = 100; radGridView1.Columns["Phone"].Width = 90; radGridView1.Columns["Fax"].Width = 90; radGridView1.Columns["Phone"].AllowFiltering = false; radGridView1.Columns["Fax"].AllowFiltering = false; } private void Form1_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'nwindDataSet.Customers' table. You can move, or remove it, as needed. this.customersTableAdapter.Fill(this.nwindDataSet.Customers); } private void radButton1_Click(object sender, EventArgs e) { Form1_Load(sender, e); }