How do I configure CustomEngine to make FilterBarCell appear

I think my custom engine is causing the FilterBarCell from appearing when I do something like this...

if(this.checkBox1.Checked)
{
// ShowFilterBar for the Main table......
this.gridGroupingControl1.TopLevelGroupOptions.ShowFilterBar = true;
//Change the appearance of the Filter Row....
this.gridGroupingControl1.TableDescriptor.Appearance.FilterBarCell.BackColor = Color.AliceBlue;
//Enable the filter for each columns
for(int i = 0 ; i< gridGroupingControl1.TableDescriptor.Columns.Count;i++ )
gridGroupingControl1.TableDescriptor.Columns[i].AllowFilter = true;
}
else
// removing filterbar for the Main table......
this.gridGroupingControl1.TopLevelGroupOptions.ShowFilterBar = false;


How do I change my sustom engine to make the filter bar configurable... i.e, show/hide

3 Replies

AD Administrator Syncfusion Team March 6, 2007 12:08 AM UTC

Hi James,

One way you can acheive this by override IsChildVisible method in a derived ChildTable/Group class to change visiblity of the filterbar in a GroupingGrid. Here is a code snippet

public override bool IsChildVisible(Element el)
{
if( el.Kind == DisplayElementKind.FilterBar)
{
return this.GroupOptions.ShowFilterBar;
}
return base.IsChildVisible (el);
}

Best regards,
Haneef


JB James Blibo March 15, 2007 07:26 PM UTC

This did not work for me. I have attach the custom engine that I am using in my code. I think that my custom engine is prevent the filter bar row from appearing...

Engine.zip


AD Administrator Syncfusion Team March 16, 2007 07:40 PM UTC

Hi James,

You need to add the FilterBarSection in a OnInitializeSections of the derived ChildTable/Group class and also you should override IsChildVisible method in a derived ChildTable/Group class to change visiblity of the filterbar in a GroupingGrid. Please refer this and let me know if this helps.

Best regards,
Haneef

Loader.
Up arrow icon