Completed
Last Updated: 13 Oct 2015 09:30 by ADMIN
ADMIN
Dimitar
Created on: 01 Oct 2015 08:32
Category: GridView
Type: Bug Report
0
FIX. RadGridView - Exception when a filter button is dragged.
To reproduce:
- Set the grid properties as follows:
    radGridView1.MasterTemplate.AllowAddNewRow = false;
    radGridView1.MasterTemplate.AllowDeleteRow = false;
    radGridView1.MasterTemplate.AllowDragToGroup = false;
    radGridView1.MasterTemplate.AllowEditRow = false;
    radGridView1.MasterTemplate.EnableFiltering = true;
    radGridView1.MasterTemplate.EnableGrouping = false;
    radGridView1.MasterTemplate.MultiSelect = true;

- Start the application and drag the filter button without releasing the mouse button.

Workaround:
class MyGridFilterRowBehavior : GridFilterRowBehavior
{
    protected override bool ProcessMouseSelection(Point mousePosition, GridCellElement currentCell)
    {
        if (currentCell is GridFilterCellElement)
        {
            return false;
        }
        return base.ProcessMouseSelection(mousePosition, currentCell);
    }
}

BaseGridBehavior gridBehavior = radGridView1.GridBehavior as BaseGridBehavior;
gridBehavior.UnregisterBehavior(typeof(GridViewFilteringRowInfo));
gridBehavior.RegisterBehavior(typeof(GridViewFilteringRowInfo), new MyGridFilterRowBehavior());

0 comments