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

Change Size of AutoComplete DropDownList

5 Answers 448 Views
CheckedDropDownList
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 28 Aug 2019, 09:28 PM

I've can change the size of the main checkbox dropdown, but I can't figure out how to change the size of the autocomplete dropdown. Here's what I've tried, along with a bunch of other stuff:

 

var itemWidth = 200;
var itemHeight = 36;
radCheckedDropDownList1.AutoCompleteMode = AutoCompleteMode.Suggest;
radCheckedDropDownList1.DropDownListElement.AutoCompleteSuggest.SuggestMode = SuggestMode.Contains;
radCheckedDropDownList1.DropDownListElement.ListElement.ItemHeight = itemHeight;
radCheckedDropDownList1.DropDownMinSize = new Size(itemWidth, (people.Count * itemHeight) + itemHeight);
radCheckedDropDownList1.DropDownMaxSize = new Size(itemWidth, (people.Count * itemHeight) + itemHeight);
radCheckedDropDownList1.DropDownMaxSize = new Size(itemWidth, (people.Count * itemHeight) + itemHeight);
RadCheckedAutoCompleteBoxListElement autoCompleteList = radCheckedDropDownList1.CheckedDropDownListElement.AutoCompleteEditableAreaElement.AutoCompleteTextBox.ListElement as RadCheckedAutoCompleteBoxListElement;
autoCompleteList.ItemHeight = itemHeight;
radCheckedDropDownList1.DropDownListElement.AutoCompleteSuggest.DropDownList.DropDownSizingMode = SizingMode.None;
radCheckedDropDownList1.DropDownListElement.AutoCompleteSuggest.DropDownList.DropDownMinSize = new Size(itemWidth, 400);
radCheckedDropDownList1.DropDownListElement.AutoCompleteSuggest.DropDownList.DropDownMaxSize = new Size(itemWidth, 400);

5 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 28 Aug 2019, 09:31 PM
It does not work, as you can see from the attached screenshot...
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 29 Aug 2019, 01:13 PM

Hello, David,  

The AutoCompleteSuggest property is relevant for RadDropDownList. But it is not applicable for RadCheckedDropDownList since it uses a RadAutoCompleteBoxElement for the editable part. 

In order to change the size of the popup displaying the suggestions, you can use the following code snippet:

 

radCheckedDropDownList1.CheckedDropDownListElement.AutoCompleteEditableAreaElement.AutoCompleteTextBox.DropDownMinSize = new Size(itemWidth, 400);

 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
David
Top achievements
Rank 1
answered on 29 Aug 2019, 01:34 PM

Thank you, Dess! That was just what I needed. And related to that, how can I set...

DropDownSizingMode = SizingMode.None

for that auto-suggest dropdown?

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 29 Aug 2019, 01:47 PM

Hello, David,  

Please refer to the following code snippet demonstrating how to control the sizing mode:

            RadTextBoxAutoCompleteDropDown dropDown = radCheckedDropDownList1.CheckedDropDownListElement.AutoCompleteEditableAreaElement.AutoCompleteTextBox.AutoCompleteDropDown as RadTextBoxAutoCompleteDropDown;
            dropDown.SizingMode = SizingMode.None;

Should you have further questions please let me know.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
David
Top achievements
Rank 1
answered on 29 Aug 2019, 03:12 PM
Perfect! Thank you so much!
Tags
CheckedDropDownList
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or