We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridFilterBar and Empty Value

Thread ID:





51263 Nov 1,2006 04:15 PM UTC Nov 2,2006 03:28 AM UTC WinForms 1
Tags: GridControl
Asked On November 1, 2006 04:15 PM UTC


I want to show or add Empty Value (Empty String) to GridFilterBar values list.
I want searching all record that having empty value in specific field (For exemple : show all record having empty description without using CustomFilter.

Thank you !

Administrator [Syncfusion]
Replied On November 2, 2006 03:28 AM UTC

Hi Zrelli,

This can be achieved by deriving the GridFilterBar class and override GridFilterBarRow and CreateUnquieEnteries methods is handled to add the "[Empty]"option in a FilterBar. Please try it and let us know if you need any further assistance.

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;
return rowFilter.Replace("[Empty]","") ;
protected override DataTable CreateUniqueEntries(DataView dv, string colName)
{DataTable dtt = base.CreateUniqueEntries(dv,colName);
DataRow dr= dtt.NewRow();
return dtt;

The following sample demonstrates above technique.

Best regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon