I use ComboBoxAdv in the Treeview control template and set AutoCompleteMode="Suggest" to filter. When there are multiple rows of data in the list, entering values in a certain row of ComboBoxAdv to filter will cause the current options of other rows of ComboBoxAdv to be cleared
Hi Wpfdev1 Kunyi,
To address the issue of ComboBoxAdv clearing options in other rows when filtering, consider implementing a custom filtering function. This function can manage the
Melon Playground filtering logic independently for each row, ensuring that the state of one ComboBox does not affect others.Additionally, you might explore using data binding to maintain separate data contexts for each ComboBoxAdv instance. This way, each ComboBox can retain its options while filtering based on user input without interference from other rows.
Hi Wpfdev1
Kunyi,
We have validated your query, and found that the issue occurs because all
instances of ComboBoxAdv are bound to the same collection .When a filter is
applied in one row, it modifies the shared collection, affecting all other ComboBoxAdv
instances.To resolve this, we recommend ensuring that each row maintains an
independent filtered collection without duplicating the data unnecessarily.
A modified sample has been attached for your reference.
If we misunderstood the requirement, please provide an update on the requirement. It will help us prompt the solution earlier.
Regards,
Nithi Sneha S