6 Answers, 1 is accepted
0
Hello Srini,
Thank you for contacting us.
Please, check this article which deals with ItemTemplate and SelectionBoxTemplate. You could create an ItemTemplate with anything you would like your combobox item to display, including plain wrapped text, and adjust the appearance further if needed with the SelectionBoxTemplate, which can force the display of only part of the item template.
Please, note that you may also need to modify the width of the drop down pop-up window to render properly your items if they are too long. You could easily change the width of the drop down using ItemsPanel.
I hope this information will provide helpful guidance for you.
Kind regards,
Dani
the Telerik team
Thank you for contacting us.
Please, check this article which deals with ItemTemplate and SelectionBoxTemplate. You could create an ItemTemplate with anything you would like your combobox item to display, including plain wrapped text, and adjust the appearance further if needed with the SelectionBoxTemplate, which can force the display of only part of the item template.
Please, note that you may also need to modify the width of the drop down pop-up window to render properly your items if they are too long. You could easily change the width of the drop down using ItemsPanel.
I hope this information will provide helpful guidance for you.
Kind regards,
Dani
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jiri
Top achievements
Rank 1
answered on 26 Jan 2015, 03:45 PM
Hi,
I have similar scenario - I have RadComboBox set with IsEdatable=true and need to be able to write and wrap lines just in editable part not in individual items from the drop down popup, which seems the SelectionBoxTemplate could be appropriate but it doesn't work for me. It seems that it only works when IsEdatable=false.
So is it possible to make it works somehow?
Thank you,
Jiri
I have similar scenario - I have RadComboBox set with IsEdatable=true and need to be able to write and wrap lines just in editable part not in individual items from the drop down popup, which seems the SelectionBoxTemplate could be appropriate but it doesn't work for me. It seems that it only works when IsEdatable=false.
So is it possible to make it works somehow?
Thank you,
Jiri
0
Hi Jiri,
With Q2 2014 release of UI for Silverlight we introduced a new TextBoxStyle property of editable RadComboBox which allows you to set directly any properties to the TextBox inside its template. So you just need to change your code like this:
I hope it helps.
Regards,
Masha
Telerik
With Q2 2014 release of UI for Silverlight we introduced a new TextBoxStyle property of editable RadComboBox which allows you to set directly any properties to the TextBox inside its template. So you just need to change your code like this:
<
telerik:RadComboBox
IsEditable
=
"True"
Width
=
"120"
>
<
telerik:RadComboBox.TextBoxStyle
>
<
Style
TargetType
=
"TextBox"
>
<
Setter
Property
=
"BorderThickness"
Value
=
"0"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"Transparent"
/>
<
Setter
Property
=
"Background"
Value
=
"Transparent"
/>
<
Setter
Property
=
"TextWrapping"
Value
=
"Wrap"
/>
</
Style
>
</
telerik:RadComboBox.TextBoxStyle
>
...
</
telerik:RadComboBox
>
I hope it helps.
Regards,
Masha
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Jiri
Top achievements
Rank 1
answered on 27 Jan 2015, 09:32 AM
Hi Masha,
thank you for your prompt answer. I have just tried it, but unfortunately it doesn't work - I am pressing enter and no new rows appears, or I don' t know where else could be a problem. Could you please verify it realy works?
Thank you,
Jiri
thank you for your prompt answer. I have just tried it, but unfortunately it doesn't work - I am pressing enter and no new rows appears, or I don' t know where else could be a problem. Could you please verify it realy works?
Thank you,
Jiri
0
Hello Jiri,
I've attached the sample project where the approach is demonstrated. Please note you should have set Width property of RadComboBox in order Text to be Wrapped. Also you need to set AcceptsReturn property of TextBox to True in order Enter key to work.
Hope it helps.
Regards,
Masha
Telerik
I've attached the sample project where the approach is demonstrated. Please note you should have set Width property of RadComboBox in order Text to be Wrapped. Also you need to set AcceptsReturn property of TextBox to True in order Enter key to work.
Hope it helps.
Regards,
Masha
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Jiri
Top achievements
Rank 1
answered on 27 Jan 2015, 10:52 AM
Hi Masha,
Yes, right I forgot on AcceptsReturn, sorry. But thank you for great help service.
Cheers,
Jiri
Yes, right I forgot on AcceptsReturn, sorry. But thank you for great help service.
Cheers,
Jiri