Hi Vincent,
Sorry for the delay in response.
You can achieve this by deriving the GridFilterBar class.In the derived class override the GridFilterBarRow and CreateUnquieEnteries methods to add the "[Empty]"option in a FilterBar. Below is the code snippets:
public class MyGridFilterBar : GridFilterBar
{
private GridDataBoundGrid grid1;
public override void WireGrid(GridDataBoundGrid grid, GridStyleInfo style)
{this.grid1 = grid;
base.WireGrid (grid, style);
}
protected override string GetFilterFromRow(GridDataBoundGrid grid)
{GridCurrentCell cc = grid.CurrentCell;
string s = cc.Renderer.ControlText;
string rowFilter = base.GetFilterFromRow(grid);
if(s != "[Empty]")
return rowFilter;
else
return rowFilter.Replace("[Empty]","") ;
}
protected override DataTable CreateUniqueEntries(DataView dv, string colName)
{DataTable dtt = base.CreateUniqueEntries(dv,colName);
DataRow dr= dtt.NewRow();
dr[0]="[Empty]";
dtt.Rows.InsertAt(dr,2);
return dtt;
}
}
Please refer the below sample and let us know if this helps:
http://websamples.syncfusion.com/samples/Grid.Windows/I71516/main.htmRegards,
Jeba.