I'm guessing the answer is no but I thought I'd ask here just to be sure.
I've put together an UltraComboEditor in conjunction with a plain ol LIST and a VALUELIST and that works fine.
I'd +LIKE+ to be able to bind it to a UltraDataSource to virtualize the list. But that doesn't appear to work.
So question is, is it supposed to, and I'm just doing it wrong? Or is this combination simply unsupported?
And a follow on to that is, if it's not supported, isn't there a way to use an UltraGrid as the dropdown area of the UltraCombo? I could have sworn I've seen this done, but I can't find any examples or discussion of it now that I'm looking for it.
Many thanks!
Darin
Yes, you can bind UltraComboEditor to UltraDataSource. But since UltraDataSource can have more than one band, you probably need to bind to the root band:
this.ultraComboEditor1.DataSource = this.ultraDataSource1.Band
If you want a multi-column dropdown that looks like UltraWinGrid, make sure you are using UltraCombo, not UltraComboEditor.
Hmmm, Actually, one more question about this. If I set the DataSource to ds.Rows, it does bind and display properly,
But.....
It appears to immediately request all the rows. If I watch the CellDataRequested, it fires "SetCount()" times. So that's not really virtuallized.I'm wondering if there's some property somewhere that's causing the combobox to think it needs to load everything.
Or it it like the UltraTree, that's just the way it works with the UltraDataSource?
Yes, that's a bit more complex, but it seems like it could be a viable approach.
Hi Mike
Yeah, you're comments about the combo are spot on. I thought it might be a quick way to get a perf boost, but, the plain combo, even with the UltraDatasource just won't quite cut it.
In the meantime, I've actually been playing with using an UltraTextEditor, in conjunction with a dropdown button and a grid and then intercepting the key press events in the text box to issue custom filtering queries to the data service to populate the grid when necessaryThat way I've got more control over the filtering. And that definitely works virtualized.
I think I'll continue down that path. Looks like the best solution for what I need.
If you want a virtualized grid that only loads the data it needs, the thing to do is check out the "Virtual Mode Sample" - assuming you chose to install the samples. This sample demonstrates how to do this with a WinGrid (not a combo). The grid doesn't do it by default, you have to opt-in by setting:
this.ultraGrid1.DisplayLayout.LoadStyle = LoadStyle.LoadOnDemand;Now for the bad news... this property is very unlikely to do you much good on UltraCombo. Since the property is on the DisplayLayout, it exists on UltraCombo just like it does on the UltraGrid. But the nature of a ComboBox is going to make this property almost useless. As soon as the user types a single character into the ComboBox, the combo has to load the data from each row until it finds a match. So it's going to force the loading or a whole lot of data, anyway.
Similarly, when you drop down the combo, it has to search the list to find a match for the current value/text. So it will end up loading a lot of the rows. Of course, it depends what you type and where the matching items are on the list. If you type in something that doesn't match any of the items, the combo is forced to load ALL of the rows, since that's the only way it will know that it didn't find a match.
Frankly, I don't think it's worth using LoadOnDemand on an UltraCombo. It's a lot of extra code for very little performance gain.