I have UltraCombo and implemented FilterUIProvider for it.
In DataSource I have 8 rows, all of them are visible in drop down, after applying filter I see only 2 rows, then I CloseUp and DropDown again, I still have 2 filtered rows and correspondent Height of DropDown (only for these two rows). I remove filter, but Height of DropDown doesn't change and I still have only two visible rows and vertical scroll bar for others.
I tried to play with MinDropDownItems and MaxDropDownItems but without result.
Can I perform changing of DropDown Height without closing and droping again?
can you show the code here; how you are trying to acheive this?
There are enough many code lines.
The main idea is the next:
I implemented class with IFilterUIProvider. It contains UltraToolbarsManager and PopupMenuTool. When I show this Filter Provider I populate PopupMenuTool with necessary tools. Let's take, for example, string column, then in PopupMenuTool I have one TextBoxTool for contains filter. On changing value of this TextBoxTool I also change the compare value of filter condition. Of course it changes the count of visible rows.(UltraCombo in Dropped state!)
So, now I have Filter for this column and after drop down see only two rows, then after removing filter (just set text in TextBoxTool to empty string) I should see more rows, and they all are there but Height of DropDown is still same and I have to scroll. For getting a normal Height of DropDown I have to close up and drop down it again.
So, DropDown without filter:
After setting filter:
After closing up, drop down and then removing filter:
Of course if you still need a part of code I will provide it to you.
So you are changing the filtering while the dropdown is still dropped down and you need it to change it's size while it's still open?
Does it do that if you change the filtering using the built-in filter UI (without a FilterUIProvider)?
Exactly!!!
Yes. It works with built-in Filter. In build-in filter I select one of the value of column cell and, of course, see only one row. Then I close up drop down -> open it again (still see one row and correspondent Height) -> remove filter and dropped down layout changes his height.
Sorry, you are right. There is a full project (without Infragistics assemblies - they are too big)
Thanks.
It's difficult for me to do anything with just a couple of cs files. Can you provide a small sample project with a grid that uses this UIProvider so I can test it out?
Without a project or solution, there are too many unknowns, like what version you are using, how you are hooking things up, etc.
Thanks, that you spent your time for me.
In the attached file you can find find my FilterUIProvider.
In it, in TextBoxTool ValueChanged handler I apply new value for contains filter ( method ApplyContainsFilter(string text) ), maybe, my mistake is there.
2. Also I have found another small problem in the filtering of UltraCombo. I tried to use multi selection in UtraCombo, usually in Value of it we have a List<object> with selected ValueMembers. But if I apply filter for some column in UltraCombo value is not relevant any more (for example, I have three selected rows, then applied filter and have got in Value another List or even null). What is wrong here?
Hi,
I did a little digging into the WinGrid source code and it looks like the Combo is designed to automatically update it's own size any time the filters change. So if your filter provider is changing the filters on the grid, then it should work automatically.
If this is not working, then we'd need to see a small sample project that demonstrates what you are doing. Perhaps your code is not using the grid's built-in filters, but is filtering in some other way?