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

API support of RadComboBox

7 Answers 184 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Satish J
Top achievements
Rank 1
Satish J asked on 08 Sep 2009, 09:33 AM
Hi,

     Could you pls confirm if your RadComboBox API supports the following requirements:

1. Truncation of combo items with an ellipsis (...) to indicate a long text.
2. Maintain a Key value for each combo item which is hidden.

Thanks,
Satish J

7 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 08 Sep 2009, 01:03 PM
Hi Satish J,

Straight to the questions:
1) RadComboBox does not provide item truncating out of the box. However, we have a TextClipper control, which can be used in a RadComboBox ItemTemplate in order to get the same behavior.
2) Each RadComboBoxItem control has a Tag property, which can be used to store any data you need. However, I would recommend databinding the control and storing the data in your data objects.

Please, let me know if you need more information.

Sincerely yours,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Satish J
Top achievements
Rank 1
answered on 09 Sep 2009, 12:48 PM
Thank you Valeri Hristov for the relpy. Could you please confirm the following additional requirements.

1) Get the value of a combo item given its index position
2) Get the Index of a combo item given its value
3) Clear all the combo items

Thanks,
Satish J
0
Valeri Hristov
Telerik team
answered on 09 Sep 2009, 01:25 PM
Hello Satish,

1) If you databind RadComboBox you will be able to access the actual data items in the Items collection of the control. Then it would be easy to get whatever property you need from your own data. On the other hand RadComboBox provides SelectedValue/SelectedValuePath properties, that allow the developers to automatically extract the value of specific property from the selected data item.
2) This is not possible out of the box.
3). This is available.

Kind regards,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Satish J
Top achievements
Rank 1
answered on 16 Sep 2009, 06:52 AM
Hi Valeri Hristov ,
                            Thanks for the confirmation. Would appreciate if you can confirm the support for the following requirements too. Iam evaluating your entire product suite to replace our existing controls with yours based on the API support:

1) Get the value of the combo box
2) Insert an item in appropriate place when the combo is sorted in ascending
3) Insert an item in appropriate place when the combo is sorted in descending
4) Get the text of the combo given its value (ie an identifier for a particular combo item) 

5) Set the Value for the current selected combo item
6) Set the text given its value (an identifier for a combo item)
7) Get the value (an identifier for a combo item) of the current combo item
8) Get the value (an identifier for a combo item) of the combo item, given its index position
9) Get the text of the combo item, given its index position

10) Set a value (an identifier for a combo item) for a combo item, given its index
11) Set a text for a combo item, given its index
12) Get the combo item count
13) Clear all the combo items
14) Remove a combo item, given its value (an identifier for a combo item)
15) Ability to set a collection (instead of a single text) as an identifier for a particular combo item.
16) Does the RadComboBox UI support displaying dropdown list of all the combo items, when a text is keyed, highlighting the ones that match the search text?

Thanks,
Satish J

0
Valeri Hristov
Telerik team
answered on 16 Sep 2009, 08:16 AM
Hi Satish J,

1) RadComboBox has SelectedValue/SelectedValuePath properties
2) and 3) RadComboBox does not support sorting out of the box. If you are databinding the control and sorting the underlying collection, I guess it depends on the collection whether you will be able to insert an item at index of your choice.
4) Text property containing the text of the currently selected item, telerik:TextSearch.TextPath attached property to specify the member of the data item that contains the text value
5) The SelectedValue property is settable, it changes the selection of the control when set (you cannot set properties on the combo box items from RadComboBox)
6) The Text property is settable and changes the selection of RadComboBox
7) The same as #1
8) Not supported out of the box
9) Not supported out of the box
10) Not supported out of the box
11) Not supported out of the box
12) RadComboBox.Items.Count
13) RadComboBox.Items.Clear() or clear the items of the underlying collection if the control is data-bound
14) Not supported out of the box. In data-bound mode it depends on the underlying collection
15) I am not sure that I understand this correctly, but I guess the answer is yes.
16) This is not supported currently, we have it in our plans for the future. The present version supports filtering, which will hide all items that does not start or contain (this is configurable) the entered text.

Regards,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Satish J
Top achievements
Rank 1
answered on 16 Sep 2009, 01:21 PM
Thanks Valeri Hristov for the prompt response. For the questions 7, 8, 9, 10, 14, the Value refers to an identifier which uniquely identifies a combo item. Now my question is:

1) Is there a way to set a unique identifier for each combo item.
2) kindly clarify the questions 7, 8, 9,10, 14 assuming Value (which is an unique identifier) is another attribute for a combo item apart from the text.
0
Valeri Hristov
Telerik team
answered on 16 Sep 2009, 02:24 PM
Hello Satish J,

You could use the Tag property to store unique identifiers for the combo box items, but RadComboBox does not have API to manipulate the tags of its items. That's why I am saying that the control does not support the unique identifier features out of the box. It would be the best if you data-bind the control and use the underlying data items' properties to store the identifier you need. Generally I recommend databinding, because in this case you have full control over what's going on under the hood and the combo box just takes care of the UI and the selection. We could prepare a databound example, if you have specific requirements about RadComboBox.

Best wishes,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox
Asked by
Satish J
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Satish J
Top achievements
Rank 1
Share this question
or