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.
Unfortunately, activation email could not send to your email. Please try again.

FilterBar error for UnBound Column

Thread ID:

Created:

Updated:

Platform:

Replies:

73065 Apr 18,2008 03:03 AM Apr 22,2008 06:52 AM Windows Forms 1
loading
Tags: GridControl
Wills Jiang
Asked On April 18, 2008 03:03 AM

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.


Yavanaarasi G [Syncfusion]
Replied On April 22, 2008 06:52 AM

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




CONFIRMATION

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.

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.

;