Suggestion - nbsp validity

3 posts, 0 answers
  1. Paul
    Paul avatar
    55 posts
    Member since:
    Nov 2010

    Posted 25 Jan 2011 Link to this post

    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. Paul
    Paul avatar
    55 posts
    Member since:
    Nov 2010

    Posted 26 Jan 2011 Link to this post

    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.
  3. DevCraft R3 2016 release webinar banner
  4. Pero
    Pero avatar
    1156 posts

    Posted 28 Jan 2011 Link to this post

    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,
    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.
Back to Top