Completed
Last Updated: 15 Aug 2017 11:03 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 24 May 2017 13:55
Category: GridView
Type: Bug Report
2
FIX. RadGridView - filter is not removed after toggling the state of the header check box
To reproduce:
1. Filter the first column in the grid
2. Click the header checkbox
3. Try to clear the filter. you iwll notice that the data is still filtered.

Workaround:

private void radGridView1_CreateCell(object sender, GridViewCreateCellEventArgs e)
{
    if (e.CellType==typeof(GridCheckBoxHeaderCellElement))
    {
        e.CellElement = new CustomHeaderCell(e.Column, e.Row);
    }
}

public class CustomHeaderCell : GridCheckBoxHeaderCellElement
{

    public CustomHeaderCell(GridViewColumn column, GridRowElement row) : base(column, row)
    {
    }

    protected override void checkbox_ToggleStateChanged(object sender, StateChangedEventArgs args)
    {
        base.checkbox_ToggleStateChanged(sender, args);
        this.TableElement.EndUpdate(false);
    }
}

0 comments