HI,
I am Using UltraCombo in my application.
I set AutoCompleteMode as SuggestAppend. but i want the end user only to enter the matching text in the editor if he try to enter anything which is not present in the values then it is should not allow the user to type other letters.
For example, given a list which contains an item whose text is "Apple", when the end user types the string "Ap", the edit portion would then be updated to include the remaining characters, "ple", so that the text of the first item that matches the typed string, "Apple", becomes selected. but after "Ap" if user trying to enter any letter other than "p" then if matching value is not there then it should not allow the user to type characters not in the dropdown list values.
i.e.,
if Apple is contained in the ComboBox List then the program will allow the user to type APPLE sequentially, if the user tries to type anyother letter other than the list values then user should not be allowed to type the characters in the editor Area of ComboBox.
I tried with the following code :-
string str = "";
bool keypressed =false; private void ultraCombo1_KeyPress( object sender, KeyPressEventArgs e ){ keypressed = true; }
private void ultraCombo1_TextChanged( object sender, EventArgs e ){ if( keypressed == true ) { str = ultraCombo1.Text; if(str != ultraCombo1.Value) { keypressed = false; if( str.Length == 0 ) return; ultraCombo1.Text = str.Substring( 0, str.Length - 1 ); } }}
it is working fine when cursor position is not changed manually .but when the user tries to move the cursor to some other position then it behaves wrongly.
There's no built-in way to do this. You should Submit a feature request to Infragistics
In normal windows combobox we can do same thing by programmatically.
Can we do same thing with UltraComboBox?
if yes then how?
I want combo functionality similar to this
check following link
http://www.codeproject.com/KB/combobox/AutoCompleteComboBox.aspx
I'm not sure what you are asking. I suppose you could set the AutoCompleteMode to None and then try to code this yourself.But I don't have a sample of this is that's what you mean. I can't see any reason why it could not be done.
ganesdpatil said:In ultra combo/combo editor when you type first letter then ultraCombo1.Text property is getting to set whole word which is not happining with normal windows combobox. For example:- Suppose I have "Apple" item in my list. then if I enter "A" then ultraCombo1.Text property is becoming "Apple" so I can't get correct string.
In ultra combo/combo editor when you type first letter then ultraCombo1.Text property is getting to set whole word which is not happining with normal windows combobox.
For example:- Suppose I have "Apple" item in my list. then if I enter "A" then ultraCombo1.Text property is becoming "Apple" so I can't get correct string.
This is the default behavior, but you can turn this off using the AutoCompleteMode property.
so how can I get Text which is entered by the end user? (In this case "A".)
If you are able to do same functionality which is done in that link please send me that sample or
simply give me some idea to do same thing with UltraCombo or ComboEditor
e.Handled = false
what it will do?