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: Filtering issue

Hi,

I have 2 ggc (A and B) and want to be able to filter B based on the record chosen in A. I have the following code, but it does not seem to work when the application is running, however does work when it is set and loaded.

this.Table.TableDirty = true;
this.Table.SummariesDirty = true;
RecordFilterDescriptor rfd = new RecordFilterDescriptor();
FilterCondition fc = new FilterCondition(FilterCompareOperator.Equals, orderId);
rfd.Name = "OrderId";
rfd.Conditions.Add(fc);

this.TableDescriptor.RecordFilters.LogicalOperator = FilterLogicalOperator.And;
this.TableDescriptor.RecordFilters.Add(rfd);

I even called Refresh() and Update() but nothing seems to work. Please help, what am I doing wrong here?

Thank you.

1 Reply

AD Administrator Syncfusion Team October 12, 2007 09:56 AM UTC

I think you need to listen to an event in the first grid to catch when the current record postion changes, and then set the filter on the second grid at that point.

Attached is a minimal sample that uses TableControlCurrentCellMoved to do this. As you click on different rows in the grid on the left, the grid on the right is filtered.

WindowsApplication21.zip

Loader.
Live Chat Icon For mobile
Up arrow icon