Home > Net >  C # combobox to implement custom fuzzy search, the filter shows how to implement the content of the
C # combobox to implement custom fuzzy search, the filter shows how to implement the content of the

Time:11-06

C # combobox to implement custom fuzzy search, the filter shows how to implement the content of the selected by default in the first paragraph, but not automatically populated?
If use combobox1 selectedindex=0, automatically filling

CodePudding user response:

Can have a try,
 for (int I=0; I & lt; TV. Nodes. The Count; I++) 
{
For (int j=0; J & lt; TV. Nodes [I]. Nodes. The Count; J++)
{
If (TV) Nodes [I]. Nodes [j]. Journal of Text. The ToUpper (). The IndexOf (" sales department (a) ") & gt; 1)
{
TV. Nodes [I]. Expand ();
TV. SelectedNode=TV. Nodes [I] Nodes [j];
TV. Focus ();
return;
}
}

CodePudding user response:

Thank you, is the combobox control c #, which master to give directions are there?

CodePudding user response:

ComboBox is a list control, mainly through the options to control the content, you want to take a text box to enter the query conditions, make query automatically hidden, not in the input box of ComboBox input query conditions,

CodePudding user response:

Which master can help me with, and in the case of not adding other controls, to implement the selected by default the first item in the drop-down, without automatic filling?

CodePudding user response:

The use of combobox, whether to have experts to give directions?

CodePudding user response:

Combobox dropdown menu, is a key/value pair, select a value, you'll get the key; Combobox1. Selectedindex=0 this is the first key, the selected automatically select the corresponding value

CodePudding user response:

@ mouse cried dead cat, I made a custom the combobox fuzzy search function, do not choose, is input, combobox dropdown will unfold,
According to conform to the content of the input item will be displayed, how can be done on an item to show the first blue in selected state, the default display after press enter,
Automatic filling combobox?
  •  Tags:  
  • C#
  • Related