This is a migrated thread and some comments may be shown as answers.

Dropdown lists in Gridview unusable

3 Answers 62 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 05 Dec 2012, 03:56 PM
Hi!
When I have a column as a combo (style: dropdown) then it only works properly when the user selects a value from the list. When an experienced user would type in the value himself, the entered value disappears again, it doesn't matter if you use the TAB or the ENTER.
Is there maybe some kind of property that I need to set to make the control match the entry in the textbox with the values in the list?

By the way: AutoCompleteMode is SuggestAndAppend

Regards,
Martin

3 Answers, 1 is accepted

Sort by
0
Svett
Telerik team
answered on 07 Dec 2012, 11:59 AM
Hello Martin,

We are aware about this issue. I am glad to inform you that we have addressed it in our internal builds. You will be able to take advantage of the fix in the upcoming service pack, due by the end of the next week. Meanwhile, you can use a custom AutoCompleteAppendHelper to resolve it on your side: 
public class CustomAutoCompleteAppendHelper : AutoCompleteAppendHelper
    {
        public CustomAutoCompleteAppendHelper(RadDropDownListElement element)
            : base(element)
        {
 
        }
 
        public override void AutoComplete(System.Windows.Forms.KeyPressEventArgs e)
        {
            base.AutoComplete(e);
            int index = this.FindShortestString(this.FindString);
 
            if (index >= 0)
            {
                this.Owner.SelectedIndex = index;
            }
        }
    }

Then you should use the CellEditorInitialized event in the following manner: 
void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    RadDropDownListEditor editor = e.ActiveEditor as RadDropDownListEditor;
 
    if (editor != null)
    {
        RadDropDownListEditorElement element = editor.EditorElement as RadDropDownListEditorElement;
        element.AutoCompleteAppend = new CustomAutoCompleteAppendHelper(element);
    }
}

I hope that you find this information useful.

Greetings,
Svett
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
0
Martin
Top achievements
Rank 1
answered on 18 Dec 2012, 10:24 AM
Hi Svett,
When will this new release come out? According to your website the next version is 2013 Q1 being released in February. But I was expecting a Q4 last week...

Regards,
Martin
0
Nikolay
Telerik team
answered on 20 Dec 2012, 01:34 PM
Hi Martin,

Our new release came out on Dec 12 and it is the Service Pack of Q3 2012. Unlike our major releases, the service packs are not listed in our Roadmap as they mainly address issues while the purpose of the Roadmap is to give insight on new important and major features that are going to be included in the product. Your particular case has been resolved in the Service Pack and it is mentioned in our Release Notes:
FIXED: ValueChanged event does not fire when selecting a new item from a drop-down list in AutoCompleteMode set to Append.

Generally speaking, you can get a notification when a new version is published by subscribing to our Release Notes RSS

As to the Service Pack build, you can update to it using our Visual Studio Extensions.

I hope this helps.

All the best,
Nikolay
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Tags
GridView
Asked by
Martin
Top achievements
Rank 1
Answers by
Svett
Telerik team
Martin
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or