Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5622
  • Last Modified:

Infragistic UltraGrid (Win) Set Filter in Code

Hi,

I'm using a Infragistic Win UltraGrid. I filled in a few comboboxes with some filter criteria.
Now I want to apply the filtercriteria through the column filter (Filtering is enabled).
How can I do this?
0
ACAE
Asked:
ACAE
1 Solution
 
ACAEAuthor Commented:
I already found the solution, see code below.
private void cmbPlanDep_SelectedIndexChanged(object sender, EventArgs e)
        {
            ugvShipmentMovements.Rows.ColumnFilters["Plan Department"].ClearFilterConditions(); 
            if (cmbPlanDep.SelectedIndex != 0)
            {
                // Create FilterCondition
                FilterCondition myConditions = new FilterCondition();
                myConditions.CompareValue = cmbPlanDep.SelectedItem.ToString();
                myConditions.ComparisionOperator = FilterComparisionOperator.Equals;
                // Adding a Column Filter to the ColumnFilters Collection returns a ColumnFilter.
                ugvShipmentMovements.Rows.ColumnFilters["Plan Department"].FilterConditions.Add(myConditions);
            }
        }

Open in new window

1

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now