Hi everyone, is there any way to have a ComboBox with SearchBar just like the on i uploaded?
The search bar will search for what you typed according to what you have in your items of the combobox.
Thanks everyone!
Hi Ruben,
I send you a sample on attachment. It’ll show you how to create the component that you need.
For more you can check our professional services : https://wisej.com/services-packages/
Kind regards,
Kevin(ITG)
I am trying to apply search function to data bound (with binding source defined) SearchComboBox.
In the code I can see that it is fetching data items:
protected override ObjectCollection CreateItemCollection()
{
return this.InnerComboBox.Items;
}
but when combo is opened I can only see Sytem.Data.DataRowView items in the list.
When clicking on the item it is correctly assigned to combo box when it is closed.
I tried defining DisplayMember and ValueMember when combo is created but no luck:
var innerComboBox = new ComboBox
{
Name = “list”,
Height = 300,
DropDownStyle = ComboBoxStyle.Simple,
AutoCompleteMode = AutoCompleteMode.Filter,
DisplayMember = this.DisplayMember,
ValueMember = this.ValueMember
};
My take on this would be to set AutoCompleteMode to AppendFilter and add a InitScript to have the filtering.
Cheers, Gerhard
Thanks Kizaemon,
with your detailed description I could reproduce it.
We´ll fix that issue and I´ll let you know when it passed QA and is included in a next Wisej.NET release.
Best regards
Frank
Screen recording of steps to reproduce.
1) Bind collection A (with 3 items)
2) Select the third item (Antigua)
3) Bind collection B (with 2 items)
4) Select the first item (Zambia)
Hi Kizaemon,
thanks for following up on this.
I have tried your test case with our latest internal build and could not reproduce it.
Can you please tell me which Wisej version you are using that shows the issue you described?
Thanks in advance!
Best regards
Frank
Hi Kevin,
thank you for the example of UserComboBox usage.
It is working well if the CB is filled using both Items.Add method and DataSource property.
When re-binding the CB to a different list, the Items.Clear/Add methods are working well.
But the WiseJ Framework throws an exception when re-binding to a different collection using the DataSource property, containing less elements that the previous one.
I attached a sample project to reproduce.
Steps to reproduce:
Kizaemon
Hi Ruben
For the moment this feature isn’t available
Wisej.Net support the filter mode in AutoCompleteMode.
The search bar is different.
Development team is actually been working on it and be available soon
As workaround for now it can be implemented using a UserComboBox
and panel in the drop down with textbox and listbox, etc.
Regards
Please login first to submit.