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.

Using GridDataTextFilteringPane when AutoPopulateColumns="True"

Thread ID:

Created:

Updated:

Platform:

Replies:

91436 Nov 18,2009 10:35 AM Nov 25,2009 10:11 PM WPF 3
loading
Tags: GridControl
Shawn
Asked On November 18, 2009 10:35 AM

hi,

When setting AutoPopulateColumns="True", how can I apply advanced filters like GridDataTextFilteringPane on all auto-generated columns?

Thanks.

Ganesan K [Syncfusion]
Replied On November 19, 2009 06:36 AM

Hi Xiang,

Thanks for using Syncfusion products.

For this, you need to listen the Model Initialized event like below

dataGrid.Model.Initialized += new EventHandler(Model_Initialized);

void Model_Initialized(object sender, EventArgs e)
{
foreach (GridDataVisibleColumn visibleColumn in dataGrid.VisibleColumns)
{
GridDataTextFilteringPane filterPane = new GridDataTextFilteringPane() { IsThemed = false, Foreground = Brushes.Black, PredicateType = Syncfusion.Windows.Data.PredicateType.And, CurrentFilterType = Syncfusion.Linq.FilterType.Equals };
visibleColumn.AllowFilter = true;
visibleColumn.FilterPane = filterPane;
}
}


Please let us know if you need any more details.

Thanks
Ganesan

Shawn
Replied On November 21, 2009 03:22 AM

Hi Ganesan,

Thank you for your help.

It works but has a problem. Although I set CurrentFilterType as "Contains", the filter type on UI remains "StartWith".

Mohamed Suhaib Fahad A. [Syncfusion]
Replied On November 25, 2009 10:11 PM

Hi Shawn,

This seems to be like a bug. We would like you to create a new Direct Trac incident to follow up with this forum details. You can create the Incident with the Forum link as the Title.

Thanks,
Fahad

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.

;