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

GGC Filterbar

Hi,
I am using GGC. I have enabled AllowFilter.
At run time by selecting value from filterbar does filters records.
I want to save this filter information. I do get correct number and name from this.grid.TableDescriptor.RecordFilters.Count,
this.grid.TableDescriptor.RecordFilters[i].Name. However ...RecordFilters[i].Expression return empty. Any suggestions.

Thanks,
Pravin



1 Reply

AD Administrator Syncfusion Team March 27, 2008 09:38 PM UTC

Hi Pravin,

To get Expression for filter bar you need to handle below code in RecordFilters_Changed event.

this.gridGroupingControl1.TableDescriptor.RecordFilters.Changed += new ListPropertyChangedEventHandler(RecordFilters_Changed);

void RecordFilters_Changed(object sender, Syncfusion.Collections.ListPropertyChangedEventArgs e)
{
int lastIndex = this.gridGroupingControl1.TableDescriptor.RecordFilters.Count - 1;
FilterConditionCollection fc = gridGroupingControl1.TableDescriptor.RecordFilters[lastIndex].Conditions;
if(fc.Count > 0)
Console.WriteLine(fc[0].FilterDescriptor.Name + " - " + fc[0].CompareOperator.ToString() + ":" + fc[0].CompareValue.ToString());
}

Please let me know if this helps.

Best regards,
Johnson



Loader.
Live Chat Icon For mobile
Up arrow icon