Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
I would like to search anywhere within list that will get form database ,
by using with C# combox
 
I already wirte sql statement for serching with 'like'
 
How to write the program to show the list by dropdown in combobox
Posted 9-Jan-13 17:04pm
ttds824
Comments
Sergey Alexandrovich Kryukov at 9-Jan-13 22:21pm
   
I don't see how these things are related. By the way, combo box is really designed to represent short lists with simple and fast navigation. If you need something more complex, you would need something more complex.
—SA
Aarti Meswania at 10-Jan-13 1:21am
   
you are right , combo box is really designed to represent short lists with simple and fast navigation.
 
but, client requirement is also not negligible because after all they are end users
In most of erp system client ask for this kind of searching facility
like while he writing customer-name = 'aar' then it gives customer-name start with 'aar' or having 'aar' in between string.
 
so, As my point of view it is common and popular problem :)
Sergey Alexandrovich Kryukov at 10-Jan-13 2:09am
   
I never saw customers who demanded that his should be a combo box, and this should be a list box, etc. Most of them don't recognize exact control types. Reasonable users refer more to the ultimate goals and application aspects. They remember about particular controls only if the UI is not good enough, unclear, inconvenient, etc. See the point? The developers usually decides. The user never knows how exactly things should look, so it's the most important thing to offer right features at right moment. Do you see my point?
—SA
Aarti Meswania at 10-Jan-13 2:29am
   
yes I agree, client doesn't have matter with a control he/she always talk regarding Facility.
 
Interesting thing is they ask for suggession-pop up and it is available in
 
textbox # autocomplete(but for developer it is string collection so for key-value scenario developer will avoid to use that one)
 
Combobox is also autocomplete and popup suggestions having ability for keeping both key and value. so, that developer(Not client) usually expect this kind of search from combobox.
 
and that's why OP is asking for combobox
all features are meeting just one to modify that popup display the records as per filtration scheme that can be override over the default one.
 
so, OP is asking for this also I am eager to know is it possible?
because right now I am redirecting user to new window for filtering data on key press. and client said please do something that I can get a popup not a new window... :)
 
you have more experience then us
so please answer could be possible with combobox
if yes(then how(override some events or other way to make make a control that can popup details like combobox doing)?)
or not possible?
Sergey Alexandrovich Kryukov at 10-Jan-13 2:58am
   
To start with, I would like to know the type of ComboBox. OP needs to specify the UI library. There is more than one class named like this. Which one? :-)
 
In all cases, it's quite possible to create a fully custom control from scratch, derived from ?.?.?.Control class.
—SA
Aarti Meswania at 10-Jan-13 3:10am
   
OP has not mention it is web or win or wpf app
but i use system.windows.forms.combobox :)
thanks for suggestion i will try to create my own control thanks for kind reply and suggestions. :)
Sergey Alexandrovich Kryukov at 10-Jan-13 9:45am
   
You are welcome. Perhaps you should better ask your own separate question, because it might be not related to OP's.
 
However, this is what happens in your case: In WPF, you potentially would be able to use its very free content model and combine any available controls with any. In Forms, this is just more limiting ability to use its only parent-child control relationships, inserting controls in panels, UserControl... So, it's more likely that you will need to start from System.Windows.Forms.Control as a base and do custom rendering.
 
I'm am not saying yet that this is the only approach, it may need some thinking...
 
If you decide to ask a separate question and notify me, please do it by commenting on this my comment.
 
—SA
jibesh at 9-Jan-13 23:17pm
   
was it web or winforms?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.150327.1 | Last Updated 11 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100