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. Image for the cookie policy date
close icon

FilterBar error for UnBound Column

Hi ,

I added filterbar for griddataboundgrid,it works.

But if the grid has an unbound column(mapping name is blank),error occured.

How to solve this?

Thanks.


1 Reply

YG Yavanaarasi G Syncfusion Team April 22, 2008 10:52 AM UTC

Hi Wills,

Thank you for your interest in Syncfusion products.

GridFilterBar does not work with unbound columns. The reason is that the filtering is done by the DataTable, and with an unbound column there is nothing in the DataTable about it.

So, you should handle the creatingColumnHeader event and cancel it for the unbound columns so that will not be set in the FilterBar row. Please refer the below code snippet:


[C#]
private void fb_CreatingColumnHeader(object sender, GridFilterBarCreatingColumnHeaderEventArgs e)
{
if (e.ColName == "Unbound")
{
e.Cancel = true;
}
}



Here is the sample for your reference:

http://websamples.syncfusion.com//samples/Grid.Windows/73065/main.htm

Please try this and let me know if this helps.

Regards,
G.Yavana




Loader.
Live Chat Icon For mobile
Up arrow icon