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

Single quote in RadTooltipManager Targetcollection gives javascript error

1 Answer 54 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Chanda
Top achievements
Rank 1
Chanda asked on 03 Apr 2009, 11:25 AM
Hello,

We are using RadToolTipManager to load control on demand with RadGrid.
In ItemDataBound event when we are adding TargetControl with value having single quote in it, it gives javascript error and no tooltip is opened.

When I google out I found that we can replace single quote (') with \&#039.

for instance in ItemDatabaound event

this.RTTGroupDetails.TargetControls.Add(nameLink.ClientID, dataValue.ToString().Replace("'",@"\&#039").ToString(), true);

 


By doing so I didn't get javascript error but when i click to get Tooltip I got ajax error

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500 


Kindly help me out to handle special character like single quote.


Regards,
Chanda.

 

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 06 Apr 2009, 01:54 PM
Hello Chanda,

The Value property is implemented to be a key value which should be sent in your request and it is not intended to be the real text the tooltip should accept. That is why you cannot use special characters since they will be interpreted as such and can lead to unexpected behavior.

Sincerely yours,
Svetlina
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
ToolTip
Asked by
Chanda
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or