Completed
Last Updated: 22 Oct 2015 08:31 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 19 Oct 2015 12:09
Category: GridView
Type: Bug Report
0
FIX. RadGridView - GridCheckBoxCellElement enters edit mode although the GridViewCheckBoxColumn.EditMode property is set to EditMode.OnValueChange
To reproduce: change the value for a GridCheckBoxCellElement. The editor is not active. However, if you click again over the current cell, the editor will be activated.

Workaround: use a custom row behavior to close the editor:
 //register the custom row  behavior
 BaseGridBehavior gridBehavior = sourceRadGridView.GridBehavior as BaseGridBehavior;
 gridBehavior.UnregisterBehavior(typeof(GridViewDataRowInfo));
 gridBehavior.RegisterBehavior(typeof(GridViewDataRowInfo), new CustomGridDataRowBehavior());


public class CustomGridDataRowBehavior : GridDataRowBehavior
{
    public override bool OnMouseUp(MouseEventArgs e)
    {
        bool result = base.OnMouseUp(e);
        if (this.MasterTemplate.CurrentColumn is GridViewCheckBoxColumn )
        {
            this.GridViewElement.EndEdit();
        }
        return result;
    }
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments