Hello All,
I am working on Infragistics Combo editor .I have changed the drop down style of combo editor to drop down as i want to edit the text.Few things which i want to do are as follows:
a) I want focus(with blue back ground) only on first four letter rather then whole text to be selected.
b) When i select a text in UltraDropdown which is having length more then the size of comboeditor control it shows the last portion of the text.I want it to show text from first letter rather then to see the last letters of the string .(This is similar to when you select an item in ultradropdownlist it showsitem from left to right)
Regards,
Prabhat Chauhan
Prabhat,
In regards to your first question, I believe that the SelectionStart and SelectionLength properties should provide the functionality that you need here. As for your second issue, I'm not really sure if there's a way to have the combo editor have all of the text selected *and* have the first portion of the text remain visible if it's larger than the area the control has available to it. You could certainly accomplish this by removing the selection:
private void ultraComboEditor1_AfterEnterEditMode(object sender, EventArgs e){ this.ultraComboEditor1.SelectionLength = 0;}
-Matt
Hello Matt,Thanks for replying.for part1 I am able to choose the first few letters by selection start but for part2 please see my analysis below:I have tried with selectionLength = 0 in fuction AfterEnterEditMode but that doesnt workthen later i tried with BeforeEnterEditMode and BeforeExitEditMode but not works.
Actually what i want if we select an item in Ultradropdown it should show the text starting from the first letter as happens in case of dropdown list(when we select an item it always show the text starting from the first letter irrespective to the length of the text) but default behaviour of drop down is like it shows the last portion of the text which hides the first portion
.for e.g Me.Ultracomboeditor1.text = "0001 United States of America" in case of ultradropdown it shows the last portion of text depending upon size of control like "States of America" but i want it to show from first portion like "001 United " as happens in case of drop down list.I am not using dropdownlist because i want combo to be editable.Here i have tried to change the dropdown displaymode to dropdownlist at runtime but it bring the control in unstable state.Hope now you will get the idea what exactly i am expecting...Thanks a lot once again for giving time .
Thanks & Regards,
When I directly set the text of the UltraComboEditor, the text is correctly set to the left for me. The only time where I had the issue you were describing is when I select a new value from the dropdownlist (as you mentioned above as well). In order to get around this, I used:
private void ultraComboEditor1_AfterCloseUp(object sender, EventArgs e){ this.ultraComboEditor1.SelectionStart = 0; this.ultraComboEditor1.SelectionLength = 0;}
If you're having this issue when assigning the Text property, then it's possible that there was a bug fix at some point, so you should ensure that you have the latest hotfix.
Thanks Matt,Let me explain you briefly actually i am using UltraComboEditor dropdown not dropdownlist.but i want my drop down to show the text starting from the left when selected this doesn't happen when we use dropdown it shows the ending portionof the text.Please see the attached Image.I cant use this.ultraComboEditor1.SelectionStart = 0; this.ultraComboEditor1.SelectionLength = 0; because i want my combodrop down to be editable and also text selected(starting from the first letter) .Problem To Track : How to make a dropdown to show the text starting from the first portion (WITH WHOLE TEXT SELECTED) here i am not bothered by last portion of the text i want my first portion of text visible as happens in case of dropdownlist(I am not using dropdownlist but i want this behaviour of dropdownlist in my dropdown).
Note: I am not using DropDownList.I am using dropdown so that i can type in to it and it will search coresponding text from list.Matt i have tried to send you image and sample source as attachment but not able to do so if you require then please give me your email id.
Thanks matt for helping and listening. Regards,Prabhat Chauhan
I guess I had misread your question initially, since I don't think that the selected text has anything to do with the text that is shown in the dropdown portion itself. Unfortunately, I don't really know of any workaround to cause the textbox to scroll all the way to the left offhand while maintaining all of the text selection. As for the dropdown portion, you may be better off setting the DropDownListWidth property to a value that will allow you to see all of the text in the list.
You should probably submit a small sample to Developer Support so that they can take a look at your sample and see if they can point you in the right direction.
Thanks a lot Matt for listening and suggesting me.
Here dropdownlistwidth property doesn't helping insolving the problem by the way i have submitted this question on the link you suggested.
Thanks a lot ..
HAPPY NEW YEAR