Hello,
Is it possible to cause text to trim with (...) on a combo box for the visible text when the combobox is closed?
We're using the combo boxes where the text can be 100 characters in length. When selecting the items from the combo box this is not a problem because it can wrap or we can do other things.
If we have test such as:"
A really long long long long description
Instead of being just trimmed we would like it to display
A really long lon...
I know how to do this for silverlight or WPF. Can we do something with asp.net Ajax controls?
Is it possible to cause text to trim with (...) on a combo box for the visible text when the combobox is closed?
We're using the combo boxes where the text can be 100 characters in length. When selecting the items from the combo box this is not a problem because it can wrap or we can do other things.
If we have test such as:"
A really long long long long description
Instead of being just trimmed we would like it to display
A really long lon...
I know how to do this for silverlight or WPF. Can we do something with asp.net Ajax controls?
5 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 13 Oct 2010, 10:54 AM
Hello,
You can add ellipsis explicitly after checking the text length either from client side or server side handler. Attach the OnClientSelectedIndexChanged event and change the Text using set_text() method of combo client object (if not using AutoPostBack).
Client-Side Basics
OnClientSelectedIndexChanged
-Shinu.
You can add ellipsis explicitly after checking the text length either from client side or server side handler. Attach the OnClientSelectedIndexChanged event and change the Text using set_text() method of combo client object (if not using AutoPostBack).
Client-Side Basics
OnClientSelectedIndexChanged
-Shinu.
0
Michael
Top achievements
Rank 1
answered on 13 Oct 2010, 07:35 PM
Thanks for the response.
This sounds like its on the right track. Do we need to use fixed width fonts? Or is there a more direct way to tell when the actual width of the text is too long? If we only count the characters, not all widths will be the same.
This sounds like its on the right track. Do we need to use fixed width fonts? Or is there a more direct way to tell when the actual width of the text is too long? If we only count the characters, not all widths will be the same.
0
Hello Michael,
I've attached a simple page to show you how to achieve text trimming according to this article, please download the file and give it a try.
Kind regards,
Yana
the Telerik team
I've attached a simple page to show you how to achieve text trimming according to this article, please download the file and give it a try.
Kind regards,
Yana
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
Monsignor
Top achievements
Rank 2
answered on 28 Oct 2010, 04:39 AM
Hello Yana,
In your sample the combo shows "..." always, even if the text is very short.
Also, it doesn't work in IE7 compatibility mode.
In your sample the combo shows "..." always, even if the text is very short.
Also, it doesn't work in IE7 compatibility mode.
0
Hello Monsignor,
You are right, these are the limitations of this method. Currently there is no other way to trim the text (except counting the characters).
Best wishes,
Yana
the Telerik team
You are right, these are the limitations of this method. Currently there is no other way to trim the text (except counting the characters).
Best wishes,
Yana
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