Completed
Last Updated: 13 Nov 2017 13:19 by Emad
ADMIN
Dimitar
Created on: 25 Oct 2017 10:39
Category: GridView
Type: Bug Report
0
FIX. RadGridView - performance issue with the header checkbox.
Use attached to reproduce.

Workaround:
class MyGridCheckBoxHeaderCellElement : GridCheckBoxHeaderCellElement
{
    public MyGridCheckBoxHeaderCellElement(GridRowElement row, GridViewColumn col) : base(col, row)
    {
    }
    bool suspenUpdate = false;
    protected override void checkbox_ToggleStateChanged(object sender, StateChangedEventArgs args)
    {
        suspenUpdate = true;
        base.checkbox_ToggleStateChanged(sender, args);
        suspenUpdate = false;
    }
    protected override void SetCheckBoxState()
    {
        if (!suspenUpdate)
        {
            base.SetCheckBoxState();
        }
        
    }
}

private void RadGridView1_CreateCell(object sender, GridViewCreateCellEventArgs e)
{
    if (e.Column != null&& e.CellType == typeof(GridCheckBoxHeaderCellElement))
    {
        e.CellElement = new MyGridCheckBoxHeaderCellElement(e.Row, e.Column);
    }
}

Attached Files:
1 comment
Emad
Posted on: 25 Oct 2017 17:02
Does not work with v.2017.1.221.40, as checkbox_ToggleStateChanged is declared private in GridCheckBoxHeaderCellElement class, so it's not possible to override it.