Completed
Last Updated: 10 Sep 2015 13:14 by Jesse Dyck
The performance of excel-like filtering when you have more than 5000+ row in RadGridView.
Completed
Last Updated: 10 Sep 2015 12:24 by ADMIN
To reproduce:
public Form1()
{
    InitializeComponent();
    DataTable dt = new DataTable();
    dt.Columns.Add(new DataColumn("Id", typeof(int)));
    dt.Columns.Add(new DataColumn("Name", typeof(string)));
    
    for (int i = 0; i < 50; i++)
    {
        dt.Rows.Add(i, "Item" + i);
    }
    radGridView1.DataSource = dt; 
  
    radGridView1.MasterTemplate.MultiSelect = true;
}

1. Load a grid with enough rows to make scrolling necessary to see the bottom row.
2. Drag a column header into the group area.
3. Move the vertical scroll bar down. It doesn't matter if you scroll all the way to the end or just barely move the vertical scroll bar, as long as it isn't all the way to the top.
4. Put the mouse on the "X" of the group descriptor. Hold the left mouse button and move the mouse.

Workaround: use custom row behavior:

            BaseGridBehavior gridBehavior = rgvTest.GridBehavior as BaseGridBehavior;
            gridBehavior.UnregisterBehavior(typeof(GridViewDataRowInfo));
            gridBehavior.RegisterBehavior(typeof(GridViewDataRowInfo), new CustomGridDataRowBehavior());

public class CustomGridDataRowBehavior : GridDataRowBehavior
{
    public CustomGridDataRowBehavior()
    {
        typeof(GridRowBehavior).GetField("orderedRows", System.Reflection.BindingFlags.NonPublic |
                                                        System.Reflection.BindingFlags.Instance).SetValue(this, new List<GridViewRowInfo>()) ;
    }

    public override bool OnMouseUp(MouseEventArgs e)
    {
        bool result = base.OnMouseUp(e);              
        typeof(GridRowBehavior).GetField("orderedRows", System.Reflection.BindingFlags.NonPublic |
                                                        System.Reflection.BindingFlags.Instance).SetValue(this, new List<GridViewRowInfo>()) ;
        return result;  
    }
}
Completed
Last Updated: 10 Sep 2015 11:15 by ADMIN
Vertical scrolling of self-referencing hierarchy in RadGridView is slow when there is more than 10 columns.
Completed
Last Updated: 10 Sep 2015 11:09 by ADMIN
RadGridView.- HierarchyDataProvider property of the GridViewTemplate should be set after the GridViewTemplate  is added to Templates Collection.
Completed
Last Updated: 10 Sep 2015 11:03 by ADMIN
To reproduce:
- Subscribe to the following RowsChanged event handler:

void radGridView1_RowsChanged(object sender, GridViewCollectionChangedEventArgs e)
{
    if (e.Action == NotifyCollectionChangedAction.ItemChanged)
    {
        GridViewDataRowInfo updrow = (GridViewDataRowInfo)e.NewItems[0];
        GridViewDataRowInfo oldrow = (GridViewDataRowInfo)e.OldItems[0];

        if (updrow.Cells[2].Value != oldrow.Cells[2].Value)
        {
            Console.WriteLine(updrow.Cells[2].Value);
            Console.WriteLine(oldrow.Cells[2].Value);
        }
    }
}

- You will notice that both values are always equal.

Workaround:
The CellValidating event can be used instead.
 
Completed
Last Updated: 10 Sep 2015 06:11 by Todor
To reproduce:
Set RadGridView MultiSelect property to true and select several rows. Export RadGridView using GridViewSpreadExport and only current row will be preserved(all selected rows are lost).

Workaround:
Save all selected rows in a collection before the export and after it set saved rows as selected.
List<GridViewRowInfo> selectedRows = new List<GridViewRowInfo>();
foreach (GridViewRowInfo row in this.radGridView1.SelectedRows)
{
    selectedRows.Add(row);
}

// Export

foreach (GridViewRowInfo row in selectedRows)
{
    row.IsSelected = true;
}
Completed
Last Updated: 10 Sep 2015 06:02 by ADMIN
How to reproduce:
Public Class Form1
    Sub New()

        InitializeComponent()

        Dim dataTable As New DataTable
        dataTable.Columns.Add("Id", GetType(Integer))
        dataTable.Columns.Add("Name", GetType(String))
        dataTable.Columns.Add("IsValid", GetType(Boolean))

        For i As Integer = 0 To 40
            dataTable.Rows.Add(i, "Name " & i, i Mod 2 = 0)
        Next

        Me.RadGridView1.DataSource = dataTable
        Me.RadGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill
        Me.RadGridView1.TableElement.RowHeight = 20
    End Sub

    Private Sub btnPrint_Click(sender As Object, e As EventArgs) Handles btnPrint.Click
        Me.RadGridView1.PrintPreview()
    End Sub

End Class

Workaround: before printing increase the row height or set RadGridView.AutoSizeRows = True
Private Sub btnPrint_Click(sender As Object, e As EventArgs) Handles btnPrint.Click
    'Me.RadGridView1.TableElement.RowHeight = 24
    Me.RadGridView1.AutoSizeRows = True
    Me.RadGridView1.PrintPreview()
End Sub

Completed
Last Updated: 09 Sep 2015 14:07 by Filippo
Steps to reproduce:
1. Add a combobox column to a grid 
2. Set DisplayMember, ValueMember and a data source to the column
3. Change a property in the data source that is used as value in the combo column

You will see that the combo column will not display text for the item which value was changed
Completed
Last Updated: 09 Sep 2015 11:38 by ADMIN
To reproduce:

public class ProgressBarCellElement : GridDataCellElement
{ 
          
    public ProgressBarCellElement(GridViewColumn column, GridRowElement row) : base(column, row)
    {
    }

    private RadProgressBarElement radProgressBarElement;

    protected override void CreateChildElements()
    {
        base.CreateChildElements();

        radProgressBarElement = new RadProgressBarElement();
        this.Children.Add(radProgressBarElement);
    }

    protected override void SetContentCore(object value)
    {
        if (this.Value != null && this.Value != DBNull.Value)
        {
            this.radProgressBarElement.Value1 = Convert.ToInt16(this.Value);
        }
    }

    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(GridDataCellElement);
        }
    }

    public override bool IsCompatible(GridViewColumn data, object context)
    {
        return data is ProgressBarColumn && context is GridDataRowElement;
    }
}

public class ProgressBarColumn : GridViewDataColumn
{
    public ProgressBarColumn() : base()
    {
    }

    public ProgressBarColumn(string fieldName) : base(fieldName)
    {
    }

    public override Type GetCellType(GridViewRowInfo row)
    {
        if (row is GridViewDataRowInfo)
        {
            return typeof(ProgressBarCellElement);
        }
        return base.GetCellType(row);
    }
}
Completed
Last Updated: 09 Sep 2015 11:28 by ADMIN
To reproduce:

public Form1()
        {
            InitializeComponent();
            
            this.radGridView1.ReadOnly = true;
            this.radGridView1.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            this.radGridView1.DataSource = CreateDataSource();
            this.radGridView1.Relations.AddSelfReference(this.radGridView1.MasterTemplate, "ID", "ParentID");

            this.radGridView1.Columns["ID"].IsVisible = false;
            this.radGridView1.Columns["ParentID"].IsVisible = false;

            this.radGridView1.MultiSelect = true;
            this.radGridView1.SelectionMode = GridViewSelectionMode.CellSelect;
        }

        private static DataTable CreateDataSource()
        {
            DataTable dataSource = new DataTable("fileSystem");
            dataSource.Columns.Add("ID", typeof(int));
            dataSource.Columns.Add("ParentID", typeof(int));
            dataSource.Columns.Add("Name", typeof(string));
            dataSource.Columns.Add("Date", typeof(DateTime));
            dataSource.Columns.Add("Type", typeof(string));
            dataSource.Columns.Add("Size", typeof(int));

            dataSource.Rows.Add(1, null, "Program Files", DateTime.Now.AddDays(-100), "Folder", 5120);
            dataSource.Rows.Add(2, 1, "Visual Studio 2010", DateTime.Now.AddDays(-100), "Folder", 3220);
            dataSource.Rows.Add(3, 2, "bin", DateTime.Now.AddDays(-100), "Folder", 3220);
            dataSource.Rows.Add(4, 2, "READEME.txt", DateTime.Now.AddDays(-100), "Text Document", 3);

            dataSource.Rows.Add(5, 1, "Telerik RadControls", DateTime.Now.AddDays(-10), "Folder", 3120);
            dataSource.Rows.Add(6, 5, "Telerik UI for Winforms", DateTime.Now.AddDays(-10), "Folder", 101);
            dataSource.Rows.Add(7, 5, "Telerik UI for Silverlight", DateTime.Now.AddDays(-10), "Folder", 123);
            dataSource.Rows.Add(8, 5, "Telerik UI for WPF", DateTime.Now.AddDays(-10), "Folder", 221);
            dataSource.Rows.Add(9, 5, "Telerik UI for ASP.NET AJAX", DateTime.Now.AddDays(-10), "Folder", 121);

            dataSource.Rows.Add(10, 1, "Microsoft Office 2010", DateTime.Now.AddDays(-120), "Folder", 1230);
            dataSource.Rows.Add(11, 10, "Microsoft Word 2010", DateTime.Now.AddDays(-120), "Folder", 1230);
            dataSource.Rows.Add(12, 10, "Microsoft Excel 2010", DateTime.Now.AddDays(-120), "Folder", 1230);
            dataSource.Rows.Add(13, 10, "Microsoft Powerpoint 2010", DateTime.Now.AddDays(-120), "Folder", 1230);

            dataSource.Rows.Add(14, 1, "Debug Diagnostic Tools v1.0", DateTime.Now.AddDays(-400), "Folder", 2120);
            dataSource.Rows.Add(15, 1, "Designer's 3D Tools", DateTime.Now.AddDays(-500), "Folder", 1120);
            dataSource.Rows.Add(16, 1, "Communication", DateTime.Now.AddDays(-700), "Folder", 120);

            dataSource.Rows.Add(17, null, "My Documents", DateTime.Now.AddDays(-200), "Folder", 1024);
            dataSource.Rows.Add(18, 17, "Salaries.xlsx", DateTime.Now.AddDays(-200), "Excel File", 1);
            dataSource.Rows.Add(19, 17, "RecessionAnalysis.xlsx", DateTime.Now.AddDays(-200), "Excel File", 1);

            dataSource.Rows.Add(20, null, "Windows", DateTime.Now.AddDays(-100), "Folder", 10240);

            dataSource.Rows.Add(21, 20, "System32", DateTime.Now.AddDays(-220), "Folder", 510);
            dataSource.Rows.Add(22, 20, "assembly", DateTime.Now.AddDays(-20), "Folder", 240);

            dataSource.Rows.Add(23, 22, "System.Data.dll", DateTime.Now.AddDays(-20), "Assembly File", 4);
            dataSource.Rows.Add(24, 22, "System.Core.dll", DateTime.Now.AddDays(-20), "Assembly File", 2);
            dataSource.Rows.Add(25, 22, "System.Drawings.dll", DateTime.Now.AddDays(-20), "Assembly File", 3);
            dataSource.Rows.Add(26, 22, "Telerik.WinControls.UI.dll", DateTime.Now.AddDays(-20), "Assembly File", 5);

            dataSource.Rows.Add(27, null, "Users", DateTime.Now.AddDays(-100), "Folder", 5512);
            dataSource.Rows.Add(28, 27, "Administrator", DateTime.Now.AddDays(-100), "Folder", 1512);
            dataSource.Rows.Add(29, 27, "Guest", DateTime.Now.AddDays(-100), "Folder", 2512);
            dataSource.Rows.Add(30, 27, "User1", DateTime.Now.AddDays(-100), "Folder", 3512);

            dataSource.Rows.Add(31, null, "Share", DateTime.Now.AddDays(-50), "Folder", 15360);
            dataSource.Rows.Add(32, 31, "Photos", DateTime.Now.AddDays(-50), "Folder", 360);
            dataSource.Rows.Add(33, 32, "Flowers.JPG", DateTime.Now.AddDays(-50), "JPEG File", 1);
            dataSource.Rows.Add(34, 32, "Panda.GIF", DateTime.Now.AddDays(-50), "GIF File", 3);
            dataSource.Rows.Add(35, 32, "Landscape.png", DateTime.Now.AddDays(-50), "PNG File", 4);

            dataSource.Rows.Add(36, null, "Music", DateTime.Now.AddDays(-2), "Folder", 0);
            dataSource.Rows.Add(37, 36, "Mozart", DateTime.Now.AddDays(-3), "Folder", 0);
            dataSource.Rows.Add(38, 36, "Pavarotti", DateTime.Now.AddDays(-40), "Folder", 0);
            dataSource.Rows.Add(39, 36, "AC/DC", DateTime.Now.AddDays(-50), "Folder", 0);
            dataSource.Rows.Add(40, 36, "Queen", DateTime.Now.AddDays(-8), "Folder", 0);

            dataSource.Rows.Add(33, null, "Boot.ini", DateTime.Now.AddDays(-10), "INI File", 0);

            return dataSource;
        }

Workaround: custom row behavior 

 //replace row behavior for hierarchical rows
 BaseGridBehavior behavior = (BaseGridBehavior)this.radGridView1.GridBehavior;
 behavior.UnregisterBehavior(typeof(GridViewHierarchyRowInfo));
 behavior.RegisterBehavior(typeof(GridViewHierarchyRowInfo), new MyGridHierarchyRowBehavior());
 //replace row behavior for data rows
 behavior.UnregisterBehavior(typeof(GridViewDataRowInfo));
 behavior.RegisterBehavior(typeof(GridViewDataRowInfo), new MyGridDataRowBehavior());

   public class MyGridHierarchyRowBehavior : GridHierarchyRowBehavior
    {
        protected override bool ProcessMouseSelection(Point mousePosition, GridCellElement currentCell)
        {
            if (this.RootGridBehavior.LockedBehavior != this)
            {
                this.GridControl.Capture = true;
                this.RootGridBehavior.LockBehavior(this);
            }

            bool result = this.DoMouseSelection(currentCell, mousePosition);

            return result;
        }

        private bool DoMouseSelection(GridCellElement currentCell, Point currentLocation)
        {
            if (!this.MasterTemplate.MultiSelect || this.GridViewElement.Template.AllowRowReorder)
            {
                return false;
            }

            Point mouseDownLocation = (Point)typeof(GridRowBehavior).GetField("mouseDownLocation", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            Rectangle rect = new Rectangle(mouseDownLocation.X - SystemInformation.DragSize.Width / 2, mouseDownLocation.Y - SystemInformation.DragSize.Height / 2,
                SystemInformation.DragSize.Width, SystemInformation.DragSize.Height);

            if (rect.Contains(currentLocation))
            {
                return false;
            }

            GridTableElement tableElement = this.GridViewElement.CurrentView as GridTableElement;

            if (tableElement == null)
            {
                return false;
            }

            bool selectionStartedOnAPinnedColumn = (bool)typeof(GridRowBehavior).GetField("selectionStartedOnAPinnedColumn", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            bool mouseDownOnLeftPinnedColumn = (bool)typeof(GridRowBehavior).GetField("mouseDownOnLeftPinnedColumn", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            bool mouseDownOnRightPinnedColumn = (bool)typeof(GridRowBehavior).GetField("mouseDownOnRightPinnedColumn", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            bool selectionStartedOnAPinnedRow = (bool)typeof(GridRowBehavior).GetField("selectionStartedOnAPinnedRow", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            bool mouseDownOnTopPinnedRow = (bool)typeof(GridRowBehavior).GetField("mouseDownOnTopPinnedRow", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            bool mouseDownOnBottomPinnedRow = (bool)typeof(GridRowBehavior).GetField("mouseDownOnBottomPinnedRow", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);

            if (selectionStartedOnAPinnedColumn && this.GetViewportBounds(tableElement).Contains(currentLocation))
            {
                if (mouseDownOnLeftPinnedColumn)
                {
                    tableElement.HScrollBar.Value = tableElement.HScrollBar.Minimum;
                    mouseDownOnLeftPinnedColumn = false;
                }

                if (mouseDownOnRightPinnedColumn)
                {
                    tableElement.HScrollBar.Value = tableElement.HScrollBar.Maximum - tableElement.HScrollBar.LargeChange + 1;
                    mouseDownOnRightPinnedColumn = false;
                }

                selectionStartedOnAPinnedColumn = false;
            }

            if (selectionStartedOnAPinnedRow && this.GetViewportBounds(tableElement).Contains(currentLocation))
            {
                if (mouseDownOnTopPinnedRow)
                {
                    tableElement.VScrollBar.Value = tableElement.VScrollBar.Minimum;
                    mouseDownOnTopPinnedRow = false;
                }

                if (mouseDownOnBottomPinnedRow)
                {
                    tableElement.VScrollBar.Value = tableElement.VScrollBar.Maximum - tableElement.VScrollBar.LargeChange + 1;
                    mouseDownOnBottomPinnedRow = false;
                }

                selectionStartedOnAPinnedRow = false;
            }

            if (currentCell.RowInfo is GridViewDataRowInfo)
            {
                if (this.MasterTemplate.SelectionMode == GridViewSelectionMode.FullRowSelect)
                {
                    typeof(GridHierarchyRowBehavior).GetMethod("DoMultiFullRowSelect", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(this, new object[] { currentCell, currentLocation });
                }
                else
                {
                    this.DoMultiCellSelect(currentCell, currentLocation);
                }
            }

            return true;
        }

        private GridRowElement GetFirstScrollableRowElement(GridTableElement tableElement)
        {
            if (tableElement.ViewElement.ScrollableRows.Children.Count < 1)
            {
                return null;
            }

            return (GridRowElement)tableElement.ViewElement.ScrollableRows.Children[0];
        }

        private GridViewColumn GetFirstScrollableColumn(GridTableElement tableElement)
        {
            GridRowElement rowElement = this.GetFirstScrollableRowElement(tableElement);

            if (rowElement == null)
            {
                return null;
            }

            int counter = 0;

            while (counter < rowElement.VisualCells.Count)
            {
                if (!rowElement.VisualCells[counter].IsPinned && rowElement.VisualCells[counter].ColumnInfo is GridViewDataColumn)
                {
                    return rowElement.VisualCells[counter].ColumnInfo;
                }

                counter++;
            }

            return null;
        }

        private int GetRowIndex(GridViewRowInfo rowInfo)
        {
            List<GridViewRowInfo> orderedRows = typeof(GridRowBehavior).GetField("orderedRows", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewRowInfo>;

            return orderedRows.IndexOf(rowInfo);
        }

        private void DoMultiCellSelect(GridCellElement currentCell, Point currentLocation)
        {
            #region GridViewSelection
            
            int rowUnderMouseIndex = this.GetRowIndex(this.RootGridBehavior.RowAtPoint.RowInfo);
            int columnUnderMouseIndex = 0;
            
            GridTableElement tableElement = this.GridViewElement.CurrentView as GridTableElement;
            GridViewColumn col = this.RootGridBehavior.CellAtPoint.ColumnInfo;
            
            if (this.RootGridBehavior.CellAtPoint.ColumnInfo is GridViewRowHeaderColumn)
            {
                col = this.GetFirstScrollableColumn(tableElement);
            }
            
            List<GridViewRowInfo> orderedRows = typeof(GridRowBehavior).GetField("orderedRows", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewRowInfo>;
            List<GridViewColumn> orderedColumns = typeof(GridRowBehavior).GetField("orderedColumns", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewColumn>;
            
            if (col != null)
            {
                columnUnderMouseIndex = orderedColumns.IndexOf(col);
            }
            
            List<GridViewRowInfo> rows = new List<GridViewRowInfo>();
            
            int anchorRowIndex = (int)typeof(GridRowBehavior).GetField("anchorRowIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
            int startIndex = Math.Min(anchorRowIndex, rowUnderMouseIndex);
            int endIndex = Math.Max(anchorRowIndex, rowUnderMouseIndex);
            
            for (int i = startIndex; i < endIndex; i++)
            {
                if (i < 0)
                {
                    continue;
                }
                if (orderedRows.Count > i)
                {
                    rows.Add(orderedRows[i]);
                }
            }
            
            int anchorColumnIndex = (int)typeof(GridRowBehavior).GetField("anchorColumnIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
            int columnLeft = Math.Min(anchorColumnIndex, columnUnderMouseIndex);
            int columnRight = Math.Max(anchorColumnIndex, columnUnderMouseIndex);
            
            GridViewSelectionCancelEventArgs cancelArgs = new GridViewSelectionCancelEventArgs(rows, columnLeft, columnRight);
            this.MasterTemplate.EventDispatcher.RaiseEvent<GridViewSelectionCancelEventArgs>(EventDispatcher.SelectionChanging, this, cancelArgs);
            
            if (cancelArgs.Cancel)
            {
                return;
            }
            
            #endregion
            
            bool isProcessedShiftOrControl = this.IsPressedShift || this.IsPressedControl;
            
            ObservableCollection<GridViewCellInfo> SelectedCells = typeof(GridViewSelectedCellsCollection).GetProperty("ObservableItems",
                BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this.MasterTemplate.SelectedCells) as ObservableCollection<GridViewCellInfo>;
            
            SelectedCells.BeginUpdate();
            this.GridViewElement.CurrentView.BeginUpdate();
            
            int count = this.MasterTemplate.SelectedCells.Count;
            bool notifyUpdates = this.ProcessCellSelection(rowUnderMouseIndex, columnUnderMouseIndex);
            
            if (isProcessedShiftOrControl)
            {
                notifyUpdates = count != this.MasterTemplate.SelectedCells.Count;
            }
            
            this.GridViewElement.CurrentView.EndUpdate(false);
            SelectedCells.EndUpdate(notifyUpdates);
        }
        
        private bool ProcessCellSelection(int rowUnderMouseIndex, int columnUnderMouseIndex)
        {
            int currentRowIndex = (int)typeof(GridRowBehavior).GetField("currentRowIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
            int anchorRowIndex = (int)typeof(GridRowBehavior).GetField("anchorRowIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
            int currentColumnIndex = (int)typeof(GridRowBehavior).GetField("currentColumnIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
            int anchorColumnIndex = (int)typeof(GridRowBehavior).GetField("anchorColumnIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
            
            if ((rowUnderMouseIndex == currentRowIndex && columnUnderMouseIndex == currentColumnIndex) || (rowUnderMouseIndex < 0 || columnUnderMouseIndex < 0))
            {
                return false;
            }
            
            bool verticalDirectionChange = (rowUnderMouseIndex < currentRowIndex && currentRowIndex > anchorRowIndex && rowUnderMouseIndex < anchorRowIndex) ||
                                           (rowUnderMouseIndex > currentRowIndex && currentRowIndex < anchorRowIndex && rowUnderMouseIndex > anchorRowIndex);
            
            bool horizontalDirectionChange = (columnUnderMouseIndex < currentColumnIndex && currentColumnIndex > anchorColumnIndex && columnUnderMouseIndex < anchorColumnIndex) ||
                                             (columnUnderMouseIndex > currentColumnIndex && currentColumnIndex < anchorColumnIndex && columnUnderMouseIndex > anchorColumnIndex);
            
            List<GridViewRowInfo> orderedRows = typeof(GridRowBehavior).GetField("orderedRows", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewRowInfo>;
            List<GridViewColumn> orderedColumns = typeof(GridRowBehavior).GetField("orderedColumns", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewColumn>;
            
            if (verticalDirectionChange || horizontalDirectionChange)
            {
                int rowStartIndex = Math.Min(anchorRowIndex, currentRowIndex);
                int rowEndIndex = Math.Max(anchorRowIndex, currentRowIndex);
                int colStartIndex = Math.Min(anchorColumnIndex, currentColumnIndex);
                int colEndIndex = Math.Max(anchorColumnIndex, currentColumnIndex);
                
                for (int i = rowStartIndex; i <= rowEndIndex; i++)
                {
                    for (int j = colStartIndex; j <= colEndIndex; j++)
                    {
                        GridViewCellInfo cell = orderedRows[i].Cells[orderedColumns[j].Index];
                        
                        if (cell != null && cell.IsSelected)
                        {
                            cell.IsSelected = false;
                        }
                    }
                }
            }
            
            bool expandingSelectionUp = rowUnderMouseIndex < currentRowIndex && rowUnderMouseIndex < anchorRowIndex;
            bool expandingSelectionDown = rowUnderMouseIndex > currentRowIndex && rowUnderMouseIndex > anchorRowIndex;
            bool expandingSelectionLeft = columnUnderMouseIndex < currentColumnIndex && columnUnderMouseIndex < anchorColumnIndex;
            bool expandingSelectionRight = columnUnderMouseIndex > currentColumnIndex && columnUnderMouseIndex > anchorColumnIndex;
            
            if (expandingSelectionDown || expandingSelectionUp || expandingSelectionLeft || expandingSelectionRight)
            {
                int rowStartIndex = Math.Min(anchorRowIndex, rowUnderMouseIndex);
                int rowEndIndex = Math.Max(anchorRowIndex, rowUnderMouseIndex);
                int colStartIndex = Math.Min(anchorColumnIndex, columnUnderMouseIndex);
                int colEndIndex = Math.Max(anchorColumnIndex, columnUnderMouseIndex);
                
                for (int i = rowStartIndex; i <= rowEndIndex; i++)
                {
                    for (int j = colStartIndex; j <= colEndIndex; j++)
                    {
                        if (i >= 0 && i < orderedRows.Count)
                        {
                            GridViewCellInfo cell = orderedRows[i].Cells[orderedColumns[j].Index];
                            
                            if (cell != null && !cell.IsSelected)
                            {
                                cell.IsSelected = true;
                            }
                        }
                    }
                }
            }
            else
            {
                bool shrinkingSelectionUp = rowUnderMouseIndex < currentRowIndex && rowUnderMouseIndex >= anchorRowIndex;
                bool shrinkingSelectionDown = rowUnderMouseIndex > currentRowIndex && rowUnderMouseIndex <= anchorRowIndex;
                bool shrinkingSelectionLeft = columnUnderMouseIndex < currentColumnIndex && columnUnderMouseIndex >= anchorColumnIndex;
                bool shrinkingSelectionRight = columnUnderMouseIndex > currentColumnIndex && columnUnderMouseIndex <= anchorColumnIndex;
                
                if (shrinkingSelectionUp || shrinkingSelectionDown)
                {
                    int rowStartIndex = Math.Min(currentRowIndex, rowUnderMouseIndex);
                    int rowEndIndex = Math.Max(currentRowIndex, rowUnderMouseIndex);
                    int colStartIndex = Math.Min(anchorColumnIndex, columnUnderMouseIndex);
                    int colEndIndex = Math.Max(anchorColumnIndex, columnUnderMouseIndex);
                    
                    if (shrinkingSelectionUp)
                    {
                        rowStartIndex += 1;
                    }
                    
                    if (shrinkingSelectionDown)
                    {
                        rowEndIndex -= 1;
                    }
                    
                    for (int i = rowStartIndex; i <= rowEndIndex; i++)
                    {
                        if (i != anchorRowIndex)
                        {
                            for (int j = colStartIndex; j <= colEndIndex; j++)
                            {
                                GridViewCellInfo cell = orderedRows[i].Cells[orderedColumns[j].Index];
                                
                                if (cell != null && cell.IsSelected)
                                {
                                    cell.IsSelected = false;
                                }
                            }
                        }
                    }
                }
                
                if (shrinkingSelectionLeft || shrinkingSelectionRight)
                {
                    int rowStartIndex = Math.Min(anchorRowIndex, rowUnderMouseIndex);
                    int rowEndIndex = Math.Max(anchorRowIndex, rowUnderMouseIndex);
                    int colStartIndex = Math.Min(currentColumnIndex, columnUnderMouseIndex);
                    int colEndIndex = Math.Max(currentColumnIndex, columnUnderMouseIndex);
                    
                    if (shrinkingSelectionLeft)
                    {
                        colStartIndex += 1;
                    }
                    
                    if (shrinkingSelectionRight)
                    {
                        colEndIndex -= 1;
                    }
                    
                    for (int i = rowStartIndex; i <= rowEndIndex; i++)
                    {
                        for (int j = colStartIndex; j <= colEndIndex; j++)
                        {
                            if (j != anchorColumnIndex && i >= 0 && i < orderedRows.Count)
                            {
                                GridViewCellInfo cell = orderedRows[i].Cells[orderedColumns[j].Index];
                                
                                if (cell != null && cell.IsSelected)
                                {
                                    cell.IsSelected = false;
                                }
                            }
                        }
                    }
                }
            }
            
            typeof(GridRowBehavior).GetField("currentRowIndex", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(this, rowUnderMouseIndex);
            typeof(GridRowBehavior).GetField("currentColumnIndex", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(this, columnUnderMouseIndex);
            
            return true;
        }
        
        private Rectangle GetViewportBounds(GridTableElement tableElement)
        {
            ScrollableRowsContainerElement scrollableRows = tableElement.ViewElement.ScrollableRows;
            Rectangle bounds = tableElement.ViewElement.ScrollableRows.ControlBoundingRectangle;
            
            for (int index = 0; index < scrollableRows.Children.Count; index++)
            {
                GridVirtualizedRowElement virtualizedRow = scrollableRows.Children[index] as GridVirtualizedRowElement;
                
                if (virtualizedRow != null)
                {
                    VirtualizedColumnContainer scrollableColumns = virtualizedRow.ScrollableColumns;
                    bounds.X = this.GridViewElement.RightToLeft ? virtualizedRow.RightPinnedColumns.ControlBoundingRectangle.Right
                               : virtualizedRow.LeftPinnedColumns.ControlBoundingRectangle.Right;
                    bounds.Width = scrollableColumns.ControlBoundingRectangle.Width;
                    
                    break;
                }
            }
            
            return bounds;
        }
        
        public override bool OnMouseMove(MouseEventArgs e)
        {
            Point currentLocation = e.Location;
            
            GridRowElement currentRow = this.RootGridBehavior.RowAtPoint;
            
            if (currentRow == null)
            {
                this.GridViewElement.TableElement.GetType().GetProperty("HoveredRow", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(this.GridViewElement.TableElement, null);
            }
            
            if (e.Button == MouseButtons.None)
            {
                return this.ShowSizeNSCursort(currentLocation);
            }
            
            if (e.Button != MouseButtons.Left)
            {
                this.ResetControlCursor();
                
                return false;
            }
            
            GridRowElement rowToResize = typeof(GridRowBehavior).GetField("rowToResize", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this) as GridRowElement;
            
            if (rowToResize != null)
            {
                this.ResizeRow(currentLocation);
                
                return true;
            }
            
            GridCellElement currentCell = this.RootGridBehavior.CellAtPoint;
            Point mouseDownLocation = (Point)typeof(GridRowBehavior).GetField("mouseDownLocation", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            GridRowElement row = this.GetRowAtPoint(mouseDownLocation);
            bool result = false;
            
            if (currentCell != null && currentCell.ViewTemplate != null && !currentCell.ViewTemplate.AllowRowReorder && row != null)
            {
                result = this.ProcessMouseSelection(currentLocation, currentCell);
            }
            
            if ((currentCell == null || currentCell.ColumnInfo == null || currentCell.ColumnInfo.IsPinned || currentCell.RowInfo.IsPinned) &&
                this.MasterTemplate.MultiSelect && mouseDownLocation != currentLocation)
            {
                typeof(GridRowBehavior).GetField("mouseMoveLocation", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(this, currentLocation);
                System.Windows.Forms.Timer scrollTimer = typeof(GridRowBehavior).GetField("scrollTimer", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this) as System.Windows.Forms.Timer;
                
                if (!scrollTimer.Enabled)
                {
                    scrollTimer.Enabled = true;
                }
                
                result = false;
            }
            
            return result;
        }
    }
    
    public class MyGridDataRowBehavior : GridDataRowBehavior
    {
        protected override bool ProcessMouseSelection(Point mousePosition, GridCellElement currentCell)
        {
            if (this.RootGridBehavior.LockedBehavior != this)
            {
                this.GridControl.Capture = true;
                this.RootGridBehavior.LockBehavior(this);
            }
            
            bool result = this.DoMouseSelection(currentCell, mousePosition);
            
            return result;
        }
        
        private bool DoMouseSelection(GridCellElement currentCell, Point currentLocation)
        {
            if (!this.MasterTemplate.MultiSelect || this.GridViewElement.Template.AllowRowReorder)
            {
                return false;
            }
            
            Point mouseDownLocation = (Point)typeof(GridRowBehavior).GetField("mouseDownLocation", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            Rectangle rect = new Rectangle(mouseDownLocation.X - SystemInformation.DragSize.Width / 2, mouseDownLocation.Y - SystemInformation.DragSize.Height / 2,
                SystemInformation.DragSize.Width, SystemInformation.DragSize.Height);
            
            if (rect.Contains(currentLocation))
            {
                return false;
            }
            
            GridTableElement tableElement = this.GridViewElement.CurrentView as GridTableElement;
            
            if (tableElement == null)
            {
                return false;
            }
            
            bool selectionStartedOnAPinnedColumn = (bool)typeof(GridRowBehavior).GetField("selectionStartedOnAPinnedColumn", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            bool mouseDownOnLeftPinnedColumn = (bool)typeof(GridRowBehavior).GetField("mouseDownOnLeftPinnedColumn", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            bool mouseDownOnRightPinnedColumn = (bool)typeof(GridRowBehavior).GetField("mouseDownOnRightPinnedColumn", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            bool selectionStartedOnAPinnedRow = (bool)typeof(GridRowBehavior).GetField("selectionStartedOnAPinnedRow", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            bool mouseDownOnTopPinnedRow = (bool)typeof(GridRowBehavior).GetField("mouseDownOnTopPinnedRow", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            bool mouseDownOnBottomPinnedRow = (bool)typeof(GridRowBehavior).GetField("mouseDownOnBottomPinnedRow", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            
            if (selectionStartedOnAPinnedColumn && this.GetViewportBounds(tableElement).Contains(currentLocation))
            {
                if (mouseDownOnLeftPinnedColumn)
                {
                    tableElement.HScrollBar.Value = tableElement.HScrollBar.Minimum;
                    mouseDownOnLeftPinnedColumn = false;
                }
                
                if (mouseDownOnRightPinnedColumn)
                {
                    tableElement.HScrollBar.Value = tableElement.HScrollBar.Maximum - tableElement.HScrollBar.LargeChange + 1;
                    mouseDownOnRightPinnedColumn = false;
                }
                
                selectionStartedOnAPinnedColumn = false;
            }
            
            if (selectionStartedOnAPinnedRow && this.GetViewportBounds(tableElement).Contains(currentLocation))
            {
                if (mouseDownOnTopPinnedRow)
                {
                    tableElement.VScrollBar.Value = tableElement.VScrollBar.Minimum;
                    mouseDownOnTopPinnedRow = false;
                }
                
                if (mouseDownOnBottomPinnedRow)
                {
                    tableElement.VScrollBar.Value = tableElement.VScrollBar.Maximum - tableElement.VScrollBar.LargeChange + 1;
                    mouseDownOnBottomPinnedRow = false;
                }
                
                selectionStartedOnAPinnedRow = false;
            }
            
            if (currentCell.RowInfo is GridViewDataRowInfo)
            {
                if (this.MasterTemplate.SelectionMode == GridViewSelectionMode.FullRowSelect)
                {
                    typeof(GridHierarchyRowBehavior).GetMethod("DoMultiFullRowSelect", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(this, new object[] { currentCell, currentLocation });
                }
                else
                {
                    this.DoMultiCellSelect(currentCell, currentLocation);
                }
            }
            
            return true;
        }
        
        private GridRowElement GetFirstScrollableRowElement(GridTableElement tableElement)
        {
            if (tableElement.ViewElement.ScrollableRows.Children.Count < 1)
            {
                return null;
            }
            
            return (GridRowElement)tableElement.ViewElement.ScrollableRows.Children[0];
        }
        
        private GridViewColumn GetFirstScrollableColumn(GridTableElement tableElement)
        {
            GridRowElement rowElement = this.GetFirstScrollableRowElement(tableElement);
            
            if (rowElement == null)
            {
                return null;
            }
            
            int counter = 0;
            
            while (counter < rowElement.VisualCells.Count)
            {
                if (!rowElement.VisualCells[counter].IsPinned && rowElement.VisualCells[counter].ColumnInfo is GridViewDataColumn)
                {
                    return rowElement.VisualCells[counter].ColumnInfo;
                }
                
                counter++;
            }
            
            return null;
        }
        
        private int GetRowIndex(GridViewRowInfo rowInfo)
        {
            List<GridViewRowInfo> orderedRows = typeof(GridRowBehavior).GetField("orderedRows", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewRowInfo>;
            
            return orderedRows.IndexOf(rowInfo);
        }
        
        private void DoMultiCellSelect(GridCellElement currentCell, Point currentLocation)
        {
            #region GridViewSelection
            
            int rowUnderMouseIndex = this.GetRowIndex(this.RootGridBehavior.RowAtPoint.RowInfo);
            int columnUnderMouseIndex = 0;
            
            GridTableElement tableElement = this.GridViewElement.CurrentView as GridTableElement;
            GridViewColumn col = this.RootGridBehavior.CellAtPoint.ColumnInfo;
            
            if (this.RootGridBehavior.CellAtPoint.ColumnInfo is GridViewRowHeaderColumn)
            {
                col = this.GetFirstScrollableColumn(tableElement);
            }
            
            List<GridViewRowInfo> orderedRows = typeof(GridRowBehavior).GetField("orderedRows", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewRowInfo>;
            List<GridViewColumn> orderedColumns = typeof(GridRowBehavior).GetField("orderedColumns", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewColumn>;
            
            if (col != null)
            {
                columnUnderMouseIndex = orderedColumns.IndexOf(col);
            }

            List<GridViewRowInfo> rows = new List<GridViewRowInfo>();
            
            int anchorRowIndex = (int)typeof(GridRowBehavior).GetField("anchorRowIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
            int startIndex = Math.Min(anchorRowIndex, rowUnderMouseIndex);
            int endIndex = Math.Max(anchorRowIndex, rowUnderMouseIndex);
            
            for (int i = startIndex; i < endIndex; i++)
            {
                if (i < 0)
                {
                    continue;
                }
                if (orderedRows.Count > i)
                {
                    rows.Add(orderedRows[i]);
                }
            }
            
            int anchorColumnIndex = (int)typeof(GridRowBehavior).GetField("anchorColumnIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
            int columnLeft = Math.Min(anchorColumnIndex, columnUnderMouseIndex);
            int columnRight = Math.Max(anchorColumnIndex, columnUnderMouseIndex);
            
            GridViewSelectionCancelEventArgs cancelArgs = new GridViewSelectionCancelEventArgs(rows, columnLeft, columnRight);
            this.MasterTemplate.EventDispatcher.RaiseEvent<GridViewSelectionCancelEventArgs>(EventDispatcher.SelectionChanging, this, cancelArgs);
            
            if (cancelArgs.Cancel)
            {
                return;
            }

            #endregion

            bool isProcessedShiftOrControl = this.IsPressedShift || this.IsPressedControl;
                
            ObservableCollection<GridViewCellInfo> SelectedCells = typeof(GridViewSelectedCellsCollection).GetProperty("ObservableItems",
                BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this.MasterTemplate.SelectedCells) as ObservableCollection<GridViewCellInfo>;
            
            SelectedCells.BeginUpdate();
            this.GridViewElement.CurrentView.BeginUpdate();
            
            int count = this.MasterTemplate.SelectedCells.Count;
            bool notifyUpdates = this.ProcessCellSelection(rowUnderMouseIndex, columnUnderMouseIndex);
            
            if (isProcessedShiftOrControl)
            {
                notifyUpdates = count != this.MasterTemplate.SelectedCells.Count;
            }
            
            this.GridViewElement.CurrentView.EndUpdate(false);
            SelectedCells.EndUpdate(notifyUpdates);
        }
        
        private bool ProcessCellSelection(int rowUnderMouseIndex, int columnUnderMouseIndex)
        {
            int currentRowIndex = (int)typeof(GridRowBehavior).GetField("currentRowIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
            int anchorRowIndex = (int)typeof(GridRowBehavior).GetField("anchorRowIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
            int currentColumnIndex = (int)typeof(GridRowBehavior).GetField("currentColumnIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
            int anchorColumnIndex = (int)typeof(GridRowBehavior).GetField("anchorColumnIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
            
            if ((rowUnderMouseIndex == currentRowIndex && columnUnderMouseIndex == currentColumnIndex) || (rowUnderMouseIndex < 0 || columnUnderMouseIndex < 0))
            {
                return false;
            }
                                           
            bool verticalDirectionChange = (rowUnderMouseIndex < currentRowIndex && currentRowIndex > anchorRowIndex && rowUnderMouseIndex < anchorRowIndex) ||
                                           (rowUnderMouseIndex > currentRowIndex && currentRowIndex < anchorRowIndex && rowUnderMouseIndex > anchorRowIndex);
                                             
            bool horizontalDirectionChange = (columnUnderMouseIndex < currentColumnIndex && currentColumnIndex > anchorColumnIndex && columnUnderMouseIndex < anchorColumnIndex) ||
                                             (columnUnderMouseIndex > currentColumnIndex && currentColumnIndex < anchorColumnIndex && columnUnderMouseIndex > anchorColumnIndex);
            
            List<GridViewRowInfo> orderedRows = typeof(GridRowBehavior).GetField("orderedRows", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewRowInfo>;
            List<GridViewColumn> orderedColumns = typeof(GridRowBehavior).GetField("orderedColumns", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewColumn>;
            
            if (verticalDirectionChange || horizontalDirectionChange)
            {
                int rowStartIndex = Math.Min(anchorRowIndex, currentRowIndex);
                int rowEndIndex = Math.Max(anchorRowIndex, currentRowIndex);
                int colStartIndex = Math.Min(anchorColumnIndex, currentColumnIndex);
                int colEndIndex = Math.Max(anchorColumnIndex, currentColumnIndex);
                
                for (int i = rowStartIndex; i <= rowEndIndex; i++)
                {
                    for (int j = colStartIndex; j <= colEndIndex; j++)
                    {
                        GridViewCellInfo cell = orderedRows[i].Cells[orderedColumns[j].Index];
                        
                        if (cell != null && cell.IsSelected)
                        {
                            cell.IsSelected = false;
                        }
                    }
                }
            }
            
            bool expandingSelectionUp = rowUnderMouseIndex < currentRowIndex && rowUnderMouseIndex < anchorRowIndex;
            bool expandingSelectionDown = rowUnderMouseIndex > currentRowIndex && rowUnderMouseIndex > anchorRowIndex;
            bool expandingSelectionLeft = columnUnderMouseIndex < currentColumnIndex && columnUnderMouseIndex < anchorColumnIndex;
            bool expandingSelectionRight = columnUnderMouseIndex > currentColumnIndex && columnUnderMouseIndex > anchorColumnIndex;
            
            if (expandingSelectionDown || expandingSelectionUp || expandingSelectionLeft || expandingSelectionRight)
            {
                int rowStartIndex = Math.Min(anchorRowIndex, rowUnderMouseIndex);
                int rowEndIndex = Math.Max(anchorRowIndex, rowUnderMouseIndex);
                int colStartIndex = Math.Min(anchorColumnIndex, columnUnderMouseIndex);
                int colEndIndex = Math.Max(anchorColumnIndex, columnUnderMouseIndex);
                
                for (int i = rowStartIndex; i <= rowEndIndex; i++)
                {
                    for (int j = colStartIndex; j <= colEndIndex; j++)
                    {
                        GridViewCellInfo cell = orderedRows[i].Cells[orderedColumns[j].Index];
                        
                        if (cell != null && !cell.IsSelected)
                        {
                            cell.IsSelected = true;
                        }
                    }
                }
            }
            else
            {
                bool shrinkingSelectionUp = rowUnderMouseIndex < currentRowIndex && rowUnderMouseIndex >= anchorRowIndex;
                bool shrinkingSelectionDown = rowUnderMouseIndex > currentRowIndex && rowUnderMouseIndex <= anchorRowIndex;
                bool shrinkingSelectionLeft = columnUnderMouseIndex < currentColumnIndex && columnUnderMouseIndex >= anchorColumnIndex;
                bool shrinkingSelectionRight = columnUnderMouseIndex > currentColumnIndex && columnUnderMouseIndex <= anchorColumnIndex;
                
                if (shrinkingSelectionUp || shrinkingSelectionDown)
                {
                    int rowStartIndex = Math.Min(currentRowIndex, rowUnderMouseIndex);
                    int rowEndIndex = Math.Max(currentRowIndex, rowUnderMouseIndex);
                    int colStartIndex = Math.Min(anchorColumnIndex, columnUnderMouseIndex);
                    int colEndIndex = Math.Max(anchorColumnIndex, columnUnderMouseIndex);
                    
                    if (shrinkingSelectionUp)
                    {
                        rowStartIndex += 1;
                    }
                    
                    if (shrinkingSelectionDown)
                    {
                        rowEndIndex -= 1;
                    }
                    
                    for (int i = rowStartIndex; i <= rowEndIndex; i++)
                    {
                        if (i != anchorRowIndex)
                        {
                            for (int j = colStartIndex; j <= colEndIndex; j++)
                            {
                                GridViewCellInfo cell = orderedRows[i].Cells[orderedColumns[j].Index];
                                
                                if (cell != null && cell.IsSelected)
                                {
                                    cell.IsSelected = false;
                                }
                            }
                        }
                    }
                }
                
                if (shrinkingSelectionLeft || shrinkingSelectionRight)
                {
                    int rowStartIndex = Math.Min(anchorRowIndex, rowUnderMouseIndex);
                    int rowEndIndex = Math.Max(anchorRowIndex, rowUnderMouseIndex);
                    int colStartIndex = Math.Min(currentColumnIndex, columnUnderMouseIndex);
                    int colEndIndex = Math.Max(currentColumnIndex, columnUnderMouseIndex);
                    
                    if (shrinkingSelectionLeft)
                    {
                        colStartIndex += 1;
                    }
                    
                    if (shrinkingSelectionRight)
                    {
                        colEndIndex -= 1;
                    }
                    
                    for (int i = rowStartIndex; i <= rowEndIndex; i++)
                    {
                        for (int j = colStartIndex; j <= colEndIndex; j++)
                        {
                            if (j != anchorColumnIndex)
                            {
                                GridViewCellInfo cell = orderedRows[i].Cells[orderedColumns[j].Index];
                                
                                if (cell != null && cell.IsSelected)
                                {
                                    cell.IsSelected = false;
                                }
                            }
                        }
                    }
                }
            }
            
            typeof(GridRowBehavior).GetField("currentRowIndex", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(this, rowUnderMouseIndex);
            typeof(GridRowBehavior).GetField("currentColumnIndex", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(this, columnUnderMouseIndex);
        
            return true;
        }
        
        private Rectangle GetViewportBounds(GridTableElement tableElement)
        {
            ScrollableRowsContainerElement scrollableRows = tableElement.ViewElement.ScrollableRows;
            Rectangle bounds = tableElement.ViewElement.ScrollableRows.ControlBoundingRectangle;
            
            for (int index = 0; index < scrollableRows.Children.Count; index++)
            {
                GridVirtualizedRowElement virtualizedRow = scrollableRows.Children[index] as GridVirtualizedRowElement;
                
                if (virtualizedRow != null)
                {
                    VirtualizedColumnContainer scrollableColumns = virtualizedRow.ScrollableColumns;
                    bounds.X = this.GridViewElement.RightToLeft ? virtualizedRow.RightPinnedColumns.ControlBoundingRectangle.Right
                               : virtualizedRow.LeftPinnedColumns.ControlBoundingRectangle.Right;
                    bounds.Width = scrollableColumns.ControlBoundingRectangle.Width;
                
                    break;
                }
            }
        
            return bounds;
        }
        
        public override bool OnMouseMove(MouseEventArgs e)
        {
            Point currentLocation = e.Location;

            GridRowElement currentRow = this.RootGridBehavior.RowAtPoint;
            
            if (currentRow == null)
            {
                this.GridViewElement.TableElement.GetType().GetProperty("HoveredRow", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(this.GridViewElement.TableElement, null);
            }
            
            if (e.Button == MouseButtons.None)
            {
                return this.ShowSizeNSCursort(currentLocation);
            }
            
            if (e.Button != MouseButtons.Left)
            {
                this.ResetControlCursor();
            
                return false;
            }

            GridRowElement rowToResize = typeof(GridRowBehavior).GetField("rowToResize", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this) as GridRowElement;
            
            if (rowToResize != null)
            {
                this.ResizeRow(currentLocation);
            
                return true;
            }
            
            GridCellElement currentCell = this.RootGridBehavior.CellAtPoint;
            Point mouseDownLocation = (Point)typeof(GridRowBehavior).GetField("mouseDownLocation", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
            GridRowElement row = this.GetRowAtPoint(mouseDownLocation);
            bool result = false;
            
            if (currentCell != null && currentCell.ViewTemplate != null && !currentCell.ViewTemplate.AllowRowReorder && row != null)
            {
                result = this.ProcessMouseSelection(currentLocation, currentCell);
            }
                
            if ((currentCell == null || currentCell.ColumnInfo == null || currentCell.ColumnInfo.IsPinned || currentCell.RowInfo.IsPinned) &&
                this.MasterTemplate.MultiSelect && mouseDownLocation != currentLocation)
            {
                typeof(GridRowBehavior).GetField("mouseMoveLocation", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(this, currentLocation);
                System.Windows.Forms.Timer scrollTimer = typeof(GridRowBehavior).GetField("scrollTimer", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this) as System.Windows.Forms.Timer;
                
                if (!scrollTimer.Enabled)
                {
                    scrollTimer.Enabled = true;
                }
            
                result = false;
            }
        
            return result;
        }
}
Completed
Last Updated: 09 Sep 2015 11:12 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: GridView
Type: Bug Report
0
Please refer to the attached gif file.
Completed
Last Updated: 08 Sep 2015 11:51 by ADMIN
To reproduce:

private void Form1_Load(object sender, EventArgs e)
{
    // TODO: This line of code loads data into the 'nwindDataSet.Products' table. You can move, or remove it, as needed.
    this.productsTableAdapter.Fill(this.nwindDataSet.Products);
    // TODO: This line of code loads data into the 'nwindDataSet.Order_Details' table. You can move, or remove it, as needed.
    this.order_DetailsTableAdapter.Fill(this.nwindDataSet.Order_Details);
    // TODO: This line of code loads data into the 'nwindDataSet.Categories' table. You can move, or remove it, as needed.
    this.categoriesTableAdapter.Fill(this.nwindDataSet.Categories);
   
    radGridView1.DataSource = nwindDataSet.Categories;

    GridViewTemplate firstChildtemplate = new GridViewTemplate();
    firstChildtemplate.DataSource = nwindDataSet.Products;
    firstChildtemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    radGridView1.MasterTemplate.Templates.Add(firstChildtemplate);

    GridViewRelation relation = new GridViewRelation(radGridView1.MasterTemplate);
    relation.ChildTemplate = firstChildtemplate;
    relation.RelationName = "CategoriesProducts";
    relation.ParentColumnNames.Add("CategoryID");
    relation.ChildColumnNames.Add("CategoryID");
    radGridView1.Relations.Add(relation);

    GridViewTemplate secondChildtemplate = new GridViewTemplate();
    secondChildtemplate.DataSource = nwindDataSet.Order_Details;
    secondChildtemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
    firstChildtemplate.Templates.Add(secondChildtemplate);

    GridViewRelation relation2 = new GridViewRelation(firstChildtemplate);
    relation2.ChildTemplate = secondChildtemplate;
    relation2.RelationName = "ProductsOrderDetails";
    relation2.ParentColumnNames.Add("ProductID");
    relation2.ChildColumnNames.Add("ProductID");
    radGridView1.Relations.Add(relation2);
    this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;
    this.radGridView1.MultiSelect = true;
    this.radGridView1.SelectionMode = Telerik.WinControls.UI.GridViewSelectionMode.CellSelect ;
}

Please refer to the attached gif file illustrating the error when performing multiple selection.

1. Workaround: use Shift + arrow keys to perform multiple selection.

2. Workaround: custom row behavior:

 BaseGridBehavior behavior = (BaseGridBehavior)this.radGridView1.GridBehavior;
behavior.UnregisterBehavior(typeof(GridViewHierarchyRowInfo));
behavior.RegisterBehavior(typeof(GridViewHierarchyRowInfo), new MyGridRowBehavior());


public class MyGridRowBehavior : GridHierarchyRowBehavior
{
    protected override bool ProcessMouseSelection(Point mousePosition, GridCellElement currentCell)
    {
        if (this.RootGridBehavior.LockedBehavior != this)
        {
            this.GridControl.Capture = true;
            this.RootGridBehavior.LockBehavior(this);
        }

        bool result = this.DoMouseSelection(currentCell, mousePosition);

        return result;
    }

    private bool DoMouseSelection(GridCellElement currentCell, Point currentLocation)
    {
        if (!this.MasterTemplate.MultiSelect || this.GridViewElement.Template.AllowRowReorder)
        {
            return false;
        }

        Point mouseDownLocation = (Point)typeof(GridRowBehavior).GetField("mouseDownLocation", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
        Rectangle rect = new Rectangle(mouseDownLocation.X - SystemInformation.DragSize.Width / 2, mouseDownLocation.Y - SystemInformation.DragSize.Height / 2,
            SystemInformation.DragSize.Width, SystemInformation.DragSize.Height);

        if (rect.Contains(currentLocation))
        {
            return false;
        }

        GridTableElement tableElement = this.GridViewElement.CurrentView as GridTableElement;

        if (tableElement == null)
        {
            return false;
        }

        bool selectionStartedOnAPinnedColumn = (bool)typeof(GridRowBehavior).GetField("selectionStartedOnAPinnedColumn", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
        bool mouseDownOnLeftPinnedColumn = (bool)typeof(GridRowBehavior).GetField("mouseDownOnLeftPinnedColumn", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
        bool mouseDownOnRightPinnedColumn = (bool)typeof(GridRowBehavior).GetField("mouseDownOnRightPinnedColumn", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
        bool selectionStartedOnAPinnedRow = (bool)typeof(GridRowBehavior).GetField("selectionStartedOnAPinnedRow", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
        bool mouseDownOnTopPinnedRow = (bool)typeof(GridRowBehavior).GetField("mouseDownOnTopPinnedRow", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);
        bool mouseDownOnBottomPinnedRow = (bool)typeof(GridRowBehavior).GetField("mouseDownOnBottomPinnedRow", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this);

        if (selectionStartedOnAPinnedColumn && this.GetViewportBounds(tableElement).Contains(currentLocation))
        {
            if (mouseDownOnLeftPinnedColumn)
            {
                tableElement.HScrollBar.Value = tableElement.HScrollBar.Minimum;
                mouseDownOnLeftPinnedColumn = false;
            }

            if (mouseDownOnRightPinnedColumn)
            {
                tableElement.HScrollBar.Value = tableElement.HScrollBar.Maximum - tableElement.HScrollBar.LargeChange + 1;
                mouseDownOnRightPinnedColumn = false;
            }

            selectionStartedOnAPinnedColumn = false;
        }

        if (selectionStartedOnAPinnedRow && this.GetViewportBounds(tableElement).Contains(currentLocation))
        {
            if (mouseDownOnTopPinnedRow)
            {
                tableElement.VScrollBar.Value = tableElement.VScrollBar.Minimum;
                mouseDownOnTopPinnedRow = false;
            }

            if (mouseDownOnBottomPinnedRow)
            {
                tableElement.VScrollBar.Value = tableElement.VScrollBar.Maximum - tableElement.VScrollBar.LargeChange + 1;
                mouseDownOnBottomPinnedRow = false;
            }

            selectionStartedOnAPinnedRow = false;
        }

        if (currentCell.RowInfo is GridViewDataRowInfo)
        {
            if (this.MasterTemplate.SelectionMode == GridViewSelectionMode.FullRowSelect)
            {
                typeof(GridHierarchyRowBehavior).GetMethod("DoMultiFullRowSelect", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(this, new object[] { currentCell, currentLocation });
            }
            else
            {
                this.DoMultiCellSelect(currentCell, currentLocation);
            }
        }

        return true;
    }

    private GridRowElement GetFirstScrollableRowElement(GridTableElement tableElement)
    {
        if (tableElement.ViewElement.ScrollableRows.Children.Count < 1)
        {
            return null;
        }

        return (GridRowElement)tableElement.ViewElement.ScrollableRows.Children[0];
    }

    private GridViewColumn GetFirstScrollableColumn(GridTableElement tableElement)
    {
        GridRowElement rowElement = this.GetFirstScrollableRowElement(tableElement);

        if (rowElement == null)
        {
            return null;
        }

        int counter = 0;

        while (counter < rowElement.VisualCells.Count)
        {
            if (!rowElement.VisualCells[counter].IsPinned && rowElement.VisualCells[counter].ColumnInfo is GridViewDataColumn)
            {
                return rowElement.VisualCells[counter].ColumnInfo;
            }

            counter++;
        }

        return null;
    }

    private int GetRowIndex(GridViewRowInfo rowInfo)
    {
        List<GridViewRowInfo> orderedRows = typeof(GridRowBehavior).GetField("orderedRows", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewRowInfo>;

        return orderedRows.IndexOf(rowInfo);
    }

    private void DoMultiCellSelect(GridCellElement currentCell, Point currentLocation)
    {
        #region GridViewSelection

        int rowUnderMouseIndex = this.GetRowIndex(this.RootGridBehavior.RowAtPoint.RowInfo);
        int columnUnderMouseIndex = 0;

        GridTableElement tableElement = this.GridViewElement.CurrentView as GridTableElement;
        GridViewColumn col = this.RootGridBehavior.CellAtPoint.ColumnInfo;

        if (this.RootGridBehavior.CellAtPoint.ColumnInfo is GridViewRowHeaderColumn)
        {
            col = this.GetFirstScrollableColumn(tableElement);
        }

        List<GridViewRowInfo> orderedRows = typeof(GridRowBehavior).GetField("orderedRows", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewRowInfo>;
        List<GridViewColumn> orderedColumns = typeof(GridRowBehavior).GetField("orderedColumns", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewColumn>;

        if (col != null)
        {
            columnUnderMouseIndex = orderedColumns.IndexOf(col);
        }

        List<GridViewRowInfo> rows = new List<GridViewRowInfo>();

        int anchorRowIndex = (int)typeof(GridRowBehavior).GetField("anchorRowIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
        int startIndex = Math.Min(anchorRowIndex, rowUnderMouseIndex);
        int endIndex = Math.Max(anchorRowIndex, rowUnderMouseIndex);

        for (int i = startIndex; i < endIndex; i++)
        {
            if (i < 0)
            {
                continue;
            }
            if (this.GridViewElement.Template.ChildRows.Count > i)
            {
                rows.Add(orderedRows[i]);
            }
        }

        int anchorColumnIndex = (int)typeof(GridRowBehavior).GetField("anchorColumnIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
        int columnLeft = Math.Min(anchorColumnIndex, columnUnderMouseIndex);
        int columnRight = Math.Max(anchorColumnIndex, columnUnderMouseIndex);

        GridViewSelectionCancelEventArgs cancelArgs = new GridViewSelectionCancelEventArgs(rows, columnLeft, columnRight);
        this.MasterTemplate.EventDispatcher.RaiseEvent<GridViewSelectionCancelEventArgs>(EventDispatcher.SelectionChanging, this, cancelArgs);

        if (cancelArgs.Cancel)
        {
            return;
        }

        #endregion

        bool isProcessedShiftOrControl = this.IsPressedShift || this.IsPressedControl;

        ObservableCollection<GridViewCellInfo> SelectedCells = typeof(GridViewSelectedCellsCollection).GetProperty("ObservableItems",
            BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this.MasterTemplate.SelectedCells) as ObservableCollection<GridViewCellInfo>;
        
        SelectedCells.BeginUpdate();
        this.GridViewElement.CurrentView.BeginUpdate();

        int count = this.MasterTemplate.SelectedCells.Count;
        bool notifyUpdates = this.ProcessCellSelection(rowUnderMouseIndex, columnUnderMouseIndex);

        if (isProcessedShiftOrControl)
        {
            notifyUpdates = count != this.MasterTemplate.SelectedCells.Count;
        }

        this.GridViewElement.CurrentView.EndUpdate(false);
        SelectedCells.EndUpdate(notifyUpdates);
    }

    private bool ProcessCellSelection(int rowUnderMouseIndex, int columnUnderMouseIndex)
    {
        int currentRowIndex = (int)typeof(GridRowBehavior).GetField("currentRowIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
        int anchorRowIndex = (int)typeof(GridRowBehavior).GetField("anchorRowIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
        int currentColumnIndex = (int)typeof(GridRowBehavior).GetField("currentColumnIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
        int anchorColumnIndex = (int)typeof(GridRowBehavior).GetField("anchorColumnIndex", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);

        if ((rowUnderMouseIndex == currentRowIndex && columnUnderMouseIndex == currentColumnIndex) || (rowUnderMouseIndex < 0 || columnUnderMouseIndex < 0))
        {
            return false;
        }

        bool verticalDirectionChange = (rowUnderMouseIndex < currentRowIndex && currentRowIndex > anchorRowIndex && rowUnderMouseIndex < anchorRowIndex) ||
                                    (rowUnderMouseIndex > currentRowIndex && currentRowIndex < anchorRowIndex && rowUnderMouseIndex > anchorRowIndex);

        bool horizontalDirectionChange = (columnUnderMouseIndex < currentColumnIndex && currentColumnIndex > anchorColumnIndex && columnUnderMouseIndex < anchorColumnIndex) ||
                                        (columnUnderMouseIndex > currentColumnIndex && currentColumnIndex < anchorColumnIndex && columnUnderMouseIndex > anchorColumnIndex);

        List<GridViewRowInfo> orderedRows = typeof(GridRowBehavior).GetField("orderedRows", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewRowInfo>;
        List<GridViewColumn> orderedColumns = typeof(GridRowBehavior).GetField("orderedColumns", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this) as List<GridViewColumn>;

        if (verticalDirectionChange || horizontalDirectionChange)
        {
            int rowStartIndex = Math.Min(anchorRowIndex, currentRowIndex);
            int rowEndIndex = Math.Max(anchorRowIndex, currentRowIndex);
            int colStartIndex = Math.Min(anchorColumnIndex, currentColumnIndex);
            int colEndIndex = Math.Max(anchorColumnIndex, currentColumnIndex);

            for (int i = rowStartIndex; i <= rowEndIndex; i++)
            {
                for (int j = colStartIndex; j <= colEndIndex; j++)
                {
                    GridViewCellInfo cell = orderedRows[i].Cells[orderedColumns[j].Index];

                    if (cell != null && cell.IsSelected)
                    {
                        cell.IsSelected = false;
                    }
                }
            }
        }

        bool expandingSelectionUp = rowUnderMouseIndex < currentRowIndex && rowUnderMouseIndex < anchorRowIndex;
        bool expandingSelectionDown = rowUnderMouseIndex > currentRowIndex && rowUnderMouseIndex > anchorRowIndex;
        bool expandingSelectionLeft = columnUnderMouseIndex < currentColumnIndex && columnUnderMouseIndex < anchorColumnIndex;
        bool expandingSelectionRight = columnUnderMouseIndex > currentColumnIndex && columnUnderMouseIndex > anchorColumnIndex;

        if (expandingSelectionDown || expandingSelectionUp || expandingSelectionLeft || expandingSelectionRight)
        {
            int rowStartIndex = Math.Min(anchorRowIndex, rowUnderMouseIndex);
            int rowEndIndex = Math.Max(anchorRowIndex, rowUnderMouseIndex);
            int colStartIndex = Math.Min(anchorColumnIndex, columnUnderMouseIndex);
            int colEndIndex = Math.Max(anchorColumnIndex, columnUnderMouseIndex);

            for (int i = rowStartIndex; i <= rowEndIndex; i++)
            {
                for (int j = colStartIndex; j <= colEndIndex; j++)
                {
                    GridViewCellInfo cell = orderedRows[i].Cells[orderedColumns[j].Index];

                    if (cell != null && !cell.IsSelected)
                    {
                        cell.IsSelected = true;
                    }
                }
            }
        }
        else
        {
            bool shrinkingSelectionUp = rowUnderMouseIndex < currentRowIndex && rowUnderMouseIndex >= anchorRowIndex;
            bool shrinkingSelectionDown = rowUnderMouseIndex > currentRowIndex && rowUnderMouseIndex <= anchorRowIndex;
            bool shrinkingSelectionLeft = columnUnderMouseIndex < currentColumnIndex && columnUnderMouseIndex >= anchorColumnIndex;
            bool shrinkingSelectionRight = columnUnderMouseIndex > currentColumnIndex && columnUnderMouseIndex <= anchorColumnIndex;

            if (shrinkingSelectionUp || shrinkingSelectionDown)
            {
                int rowStartIndex = Math.Min(currentRowIndex, rowUnderMouseIndex);
                int rowEndIndex = Math.Max(currentRowIndex, rowUnderMouseIndex);
                int colStartIndex = Math.Min(anchorColumnIndex, columnUnderMouseIndex);
                int colEndIndex = Math.Max(anchorColumnIndex, columnUnderMouseIndex);

                if (shrinkingSelectionUp)
                {
                    rowStartIndex += 1;
                }

                if (shrinkingSelectionDown)
                {
                    rowEndIndex -= 1;
                }

                for (int i = rowStartIndex; i <= rowEndIndex; i++)
                {
                    if (i != anchorRowIndex)
                    {
                        for (int j = colStartIndex; j <= colEndIndex; j++)
                        {
                            GridViewCellInfo cell = orderedRows[i].Cells[orderedColumns[j].Index];

                            if (cell != null && cell.IsSelected)
                            {
                                cell.IsSelected = false;
                            }
                        }
                    }
                }
            }

            if (shrinkingSelectionLeft || shrinkingSelectionRight)
            {
                int rowStartIndex = Math.Min(anchorRowIndex, rowUnderMouseIndex);
                int rowEndIndex = Math.Max(anchorRowIndex, rowUnderMouseIndex);
                int colStartIndex = Math.Min(currentColumnIndex, columnUnderMouseIndex);
                int colEndIndex = Math.Max(currentColumnIndex, columnUnderMouseIndex);

                if (shrinkingSelectionLeft)
                {
                    colStartIndex += 1;
                }

                if (shrinkingSelectionRight)
                {
                    colEndIndex -= 1;
                }

                for (int i = rowStartIndex; i <= rowEndIndex; i++)
                {
                    for (int j = colStartIndex; j <= colEndIndex; j++)
                    {
                        if (j != anchorColumnIndex)
                        {
                            GridViewCellInfo cell = orderedRows[i].Cells[orderedColumns[j].Index];

                            if (cell != null && cell.IsSelected)
                            {
                                cell.IsSelected = false;
                            }
                        }
                    }
                }
            }
        }

        typeof(GridRowBehavior).GetField("currentRowIndex", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(this, rowUnderMouseIndex);
        typeof(GridRowBehavior).GetField("currentColumnIndex", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(this, columnUnderMouseIndex);

        return true;
    }

    private Rectangle GetViewportBounds(GridTableElement tableElement)
    {
        ScrollableRowsContainerElement scrollableRows = tableElement.ViewElement.ScrollableRows;
        Rectangle bounds = tableElement.ViewElement.ScrollableRows.ControlBoundingRectangle;

        for (int index = 0; index < scrollableRows.Children.Count; index++)
        {
            GridVirtualizedRowElement virtualizedRow = scrollableRows.Children[index] as GridVirtualizedRowElement;

            if (virtualizedRow != null)
            {
                VirtualizedColumnContainer scrollableColumns = virtualizedRow.ScrollableColumns;
                bounds.X = this.GridViewElement.RightToLeft ? virtualizedRow.RightPinnedColumns.ControlBoundingRectangle.Right
                           : virtualizedRow.LeftPinnedColumns.ControlBoundingRectangle.Right;
                bounds.Width = scrollableColumns.ControlBoundingRectangle.Width;

                break;
            }
        }

        return bounds;
    }
}
Completed
Last Updated: 08 Sep 2015 11:37 by ADMIN
To reproducce:
- Set the format of a GridViewDateTime column as follows:
GridViewDateTimeColumn dateTimeColumn1 = radGridView1.Columns[3] as GridViewDateTimeColumn;
dateTimeColumn1.Format = DateTimePickerFormat.Custom;

dateTimeColumn1.CustomFormat = "dd.MM.yyyy HH:mm";
dateTimeColumn1.FormatString = "dd.MM.yyyy HH:mm";

- Start the application and try to enter the time.
- You will notice that the caret is moved to the firs item.

Workaround 
void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    RadDateTimeEditor editor = e.ActiveEditor as RadDateTimeEditor;
    if (editor != null)
    {
        RadDateTimeEditorElement element = editor.EditorElement as RadDateTimeEditorElement;
        element.TextBoxElement.TextBoxItem.RouteMessages = true;
     
    }
}
Declined
Last Updated: 08 Sep 2015 11:31 by ADMIN
Synchronization between the filter descriptors collection and the excel like filtering.
Completed
Last Updated: 07 Sep 2015 07:43 by ADMIN
To reproduce:

private void Form1_Load(object sender, EventArgs e)
{
    this.customersTableAdapter.Fill(this.nwindDataSet.Customers);

    this.radGridView1.DataSource = this.customersBindingSource;
    this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;

    foreach (GridViewColumn col in this.radGridView1.Columns)
    {
        col.MinWidth = 100;
    }
    
    ColumnGroupsViewDefinition view = new ColumnGroupsViewDefinition();
    view.ColumnGroups.Add(new GridViewColumnGroup("Customer Contact"));
    view.ColumnGroups.Add(new GridViewColumnGroup("Details"));
    view.ColumnGroups[1].Groups.Add(new GridViewColumnGroup("Address"));
    view.ColumnGroups[1].Groups.Add(new GridViewColumnGroup("Contact"));
    view.ColumnGroups[0].Rows.Add(new GridViewColumnGroupRow());
    view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["CompanyName"]);
    view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["ContactName"]);
    view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["ContactTitle"]);

    view.ColumnGroups[1].Groups[0].Rows.Add(new GridViewColumnGroupRow());
    view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["Address"]);
    view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["City"]);
    view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["Country"]);

    view.ColumnGroups[1].Groups[1].Rows.Add(new GridViewColumnGroupRow());
    view.ColumnGroups[1].Groups[1].Rows[0].Columns.Add(this.radGridView1.Columns["Phone"]);
    view.ColumnGroups[1].Groups[1].Rows[0].Columns.Add(this.radGridView1.Columns["Fax"]);
    radGridView1.ViewDefinition = view;
}

Please refer to the attached gif file illustrating the behavior when no ColumnGroupsViewDefinition is applied. The horizontal scroll-car should appear as well when the grid's width is less than the total MinWidth of all columns in case of ColumnGroupsViewDefinition.

Workaround: use GridViewAutoSizeColumnsMode.None and handle the RadGridView.SizeChanged event where you can adjust manually the Width of the visible columns on a way to simulate GridViewAutoSizeColumnsMode.Fill. Here is a sample approach:

private void Form1_Load(object sender, EventArgs e)
{
    this.customersTableAdapter.Fill(this.nwindDataSet.Customers);

    this.radGridView1.DataSource = this.customersBindingSource;
    this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.None;

    foreach (GridViewColumn col in this.radGridView1.Columns)
    {
        col.MinWidth = 100;
    }

    ColumnGroupsViewDefinition view = new ColumnGroupsViewDefinition();
    view.ColumnGroups.Add(new GridViewColumnGroup("Customer Contact"));
    view.ColumnGroups.Add(new GridViewColumnGroup("Details"));
    view.ColumnGroups[1].Groups.Add(new GridViewColumnGroup("Address"));
    view.ColumnGroups[1].Groups.Add(new GridViewColumnGroup("Contact"));
    view.ColumnGroups[0].Rows.Add(new GridViewColumnGroupRow());
    view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["CompanyName"]);
    view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["ContactName"]);
    view.ColumnGroups[0].Rows[0].Columns.Add(this.radGridView1.Columns["ContactTitle"]);

    view.ColumnGroups[1].Groups[0].Rows.Add(new GridViewColumnGroupRow());
    view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["Address"]);
    view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["City"]);
    view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(this.radGridView1.Columns["Country"]);

    view.ColumnGroups[1].Groups[1].Rows.Add(new GridViewColumnGroupRow());
    view.ColumnGroups[1].Groups[1].Rows[0].Columns.Add(this.radGridView1.Columns["Phone"]);
    view.ColumnGroups[1].Groups[1].Rows[0].Columns.Add(this.radGridView1.Columns["Fax"]);
    radGridView1.ViewDefinition = view;

    radGridView1.SizeChanged += radGridView1_SizeChanged;
}

private void radGridView1_SizeChanged(object sender, EventArgs e)
{
    int totalMinimumWidth = 0;
    int columnsCount = ColumnsCountWidth(out totalMinimumWidth);
    int delta = this.radGridView1.Width - totalMinimumWidth;
    AdjustColumnWidth(delta / columnsCount);
}

private void AdjustColumnWidth(int widthToAdd)
{
    ColumnGroupsViewDefinition view = this.radGridView1.ViewDefinition as ColumnGroupsViewDefinition;
    if (view == null)
    {
        return;
    }

    foreach (GridViewColumnGroup group in view.ColumnGroups)
    {
        AdjustColumnsInGroup(widthToAdd, group);
    }
}

private void AdjustColumnsInGroup(int widthToAdd, GridViewColumnGroup group)
{
    if (group.Groups.Count == 0)
    {
        foreach (GridViewColumnGroupRow row in group.Rows)
        {
            foreach (GridViewColumn col in row.Columns)
            {
                col.Width += widthToAdd;
            }
        }
    }
    else
    {
        foreach (GridViewColumnGroup g in group.Groups)
        {
            AdjustColumnsInGroup(widthToAdd, g);
        }
    }
}

private int ColumnsCountWidth(out int totalMinWidth)
{
    int columnsCount = 0;
    totalMinWidth = 0;
    ColumnGroupsViewDefinition view = this.radGridView1.ViewDefinition as ColumnGroupsViewDefinition;
    if (view == null)
    {
        return this.radGridView1.Columns.Count;
    }

    foreach (GridViewColumnGroup group in view.ColumnGroups)
    {
        columnsCount = IterateGroups(columnsCount, group, ref totalMinWidth);              
    }
    return columnsCount;
}

private static int IterateGroups(int columnsCount, GridViewColumnGroup group, ref int totalMinWidth)
{
    int count = columnsCount;
    if (group.Groups.Count == 0)
    {
        foreach (GridViewColumnGroupRow row in group.Rows)
        {
            count += row.Columns.Count;
            foreach (GridViewColumn col in row.Columns)
            {
                totalMinWidth += col.Width;
            }
        }
    }
    else
    {
        foreach (GridViewColumnGroup g in group.Groups)
        {
            count = IterateGroups(count, g, ref totalMinWidth);
        }
    }
    return count;
}
Completed
Last Updated: 31 Aug 2015 10:11 by ADMIN
To reproduce:
- Add a grid to a blank form.
- Group the grid on a single column and expand a group row.
- Add and then remove a summary row by calling the clear method.
- You will notice that the summary row is not removed.


Workaround: reset the groups after the summary rows are cleared:
radGridView1.SummaryRowsBottom.Clear();
 
List<GroupDescriptor> list = new List<GroupDescriptor>();
 
foreach (var item in radGridView1.GroupDescriptors)
{
    list.Add(item);
}
 
radGridView1.GroupDescriptors.Clear();
radGridView1.MasterTemplate.Refresh();
 
foreach (var item in list)
{
    radGridView1.GroupDescriptors.Add(item);
}
 
 radGridView1.MasterTemplate.Refresh();
Completed
Last Updated: 27 Aug 2015 09:47 by ADMIN
To reproduce:
- Populate the grid with some double values.
- Change the culture to Dutch(Belgian)
- Export the grid

Workaround:

void spreadExporter_CellFormatting(object sender, Telerik.WinControls.UI.Export.SpreadExport.CellFormattingEventArgs e)
{
    if (e.GridColumnIndex == 0 && e.GridCellInfo.Value != string.Empty)
    {
        CellValueFormat cvf = new CellValueFormat("0,00");
        e.CellSelection.SetFormat(cvf);
        e.CellSelection.SetValue(((double)e.GridCellInfo.Value));
    }
}
Completed
Last Updated: 25 Aug 2015 09:42 by ADMIN
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.
Completed
Last Updated: 25 Aug 2015 07:08 by ADMIN
(Two related issues)

1) If I call method RunExport(@"C:\Temp\Foo.xml") on an instance of ExportToExcelML, it creates a file called "C:\Temp\Foo.xls" (notice the change of the file extension).

2) But "*.xls" is the wrong file extension, causing Excel to produce a "The file format and extension of 'Foo.xls' don't match..." warning when the file is opened. This warning does not appear if the file is saved as "*.xml". 

My suggestion: 

1) Keep any given file extension in ExportToExcelML.RunExport(..)
2) Adjust the intellisense help text of the RunExport-method accordingly that it mentions the possibility to save the file with extension ".xml" to avoid the said excel warning but with the drawback that this file extension is not exclusively associated with Excel.