hi,
When setting AutoPopulateColumns="True", how can I apply advanced filters like GridDataTextFilteringPane on all auto-generated columns?
Thanks.
GK
Ganesan K
Syncfusion Team
November 19, 2009 11:36 AM UTC
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
SH
Shawn
November 21, 2009 08:22 AM UTC
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".
MS
Mohamed Suhaib Fahad A.
Syncfusion Team
November 26, 2009 03:11 AM UTC
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