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

Suggestion - nbsp validity

2 Answers 43 Views
TagCloud
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 25 Jan 2011, 08:38 PM
Hi. I am contemplating using the TagCloud to display some information that I am generating (actually in code behind from a database). I am therefore not using the TagCloud to scan external text, files, url.... I am setting the .text property from the code behind and creating a comma seperated string. I can control the string and control that the only punctuation character is ','.

My problem is that some of the tags are two words ("Sales Manager", "Retail Shop"....). If I create the aggregate string it would look like:

"Word1, Word2, Sales Manager, Another, Word, Retail Shop, ....."

This is all fine. However, even if I set PunctuationCharacters = "," the tagCloud still parses the .text using space as a valid separator. I thought that I could be clever and perform a newSubString.replace(' ', '\u00A0') to replace spaces with  . However, the tagCloud still parses this so that I end up with two items in the cloud for "Sales" and "Manager". At the moment I am therefore performing a .replace(' ', '_') now and accepting the display consequences for this.

I am assuming that I haven't made any mistakes and this is correct behaviour. Could I suggest an enhancement such that is you include \u00A0 in the punctuationValidCharacters then the tagCloud will treat it as a 'no break space'.

2 Answers, 1 is accepted

Sort by
0
Paul
Top achievements
Rank 1
answered on 26 Jan 2011, 05:27 PM
Hi. When I made the original post I was just starting to look at using the tagCloud. I realise now that the cloud uses an items collection that can be modified with code behind. The items include a text property and that can contain spaces. Thus I can solve the problem by avoiding use of the cloud's text property and instead directly controlling the items collection in code behind. However, I still think consideration should be given to whether nbsp should be a character that can be used as a non punctuation character.
0
Pero
Telerik team
answered on 28 Jan 2011, 05:52 PM
Hello Paul,

Thank you for the suggestion. We will consider it, when planning the new features that should be implemented in our controls. However, I cannot guarantee that it will be implemented.

Please, let us know if you have any other ideas about new features that should be implemented in our controls of any control suite.

All the best,
Pero
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
TagCloud
Asked by
Paul
Top achievements
Rank 1
Answers by
Paul
Top achievements
Rank 1
Pero
Telerik team
Share this question
or