Completed
Last Updated: 26 Jan 2015 14:17 by ADMIN
ADMIN
Dimitar
Created on: 20 Jan 2015 07:26
Category: GridView
Type: Bug Report
0
FIX. RadGridView - GridViewCheckBoxColumn - the header cell checkbox is automatically checked when the user is filtering.
To reproduce:
- Add checkbox column to a grid and enable filtering.
- Filter on other column so there are no rows visible.
- The header cell checkbox is checked automatically.

Workaround:
void radGridView_CreateCell(object sender, GridViewCreateCellEventArgs e)
{
    if (e.CellType == typeof(GridCheckBoxHeaderCellElement))
    {
        e.CellElement = new GridCheckBoxHeaderCellElement(e.Column,e.Row);

        ((GridCheckBoxHeaderCellElement)e.CellElement).CheckBox.ToggleStateChanging += CheckBox_ToggleStateChanging;
    }
}

void CheckBox_ToggleStateChanging(object sender, StateChangingEventArgs args)
{
    if (radDevices.ChildRows.Count == 0)
    {
        args.Cancel = true;
    }
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments