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

Changing OnClientClick and Tooltip properties inside RadAjaxPanel

3 Answers 57 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Markus Jansson
Top achievements
Rank 1
Markus Jansson asked on 14 Oct 2009, 05:39 PM
Hello!

I have a LinkButton inside a RadAjaxPanel that needs to change some properties when ajax postback occurs. CssClass changes but not OnClientClick and Tooltip. So originally I set the properties like this:

lbtButton.CssClass = "Class1" 
lbtButton.ToolTip = "First Text" 
lbtButton.OnClientClick = "DoThis"

When someone clicks a submit button inside the RadAjaxPanel the code behind tries to change the properties like this:

lbtButton.CssClass = "Class2"    
lbtButton.ToolTip = "Second Text"    
lbtButton.OnClientClick = "DoThat" 

Now the CssClass updates but the OnClientClick and Tooltip properties do not. Why do they not update and what can I do to make it work?

Hope you understand what I'm asking. Any help would be appreciated.

Regards,
Markus

3 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 20 Oct 2009, 06:31 AM
Hi Markus,

I followed your scenario and prepared a sample project for you. Please try it on your end and let me know if it works as desired and what differs in your case.

Best wishes,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Markus Jansson
Top achievements
Rank 1
answered on 22 Oct 2009, 10:50 AM
Hi!

Thanks for your answer. I realize though that my example was too simplified. The full page involves dynamically created linkbuttons and other things that complicate the matter. To prepare an adequate example for you would probably take me quite a lot of time. But I was able to work around the problem described by creating new linkbuttons instead of altering the ones already on the page, so for now I'm happy anyway :)

Once again, thanks!

Markus
0
Iana Tsolova
Telerik team
answered on 26 Oct 2009, 12:18 PM
Hello Markus,

I am happy to hear you have found a resolution for your case.

Do not hesitate to write us back if any issues arise.

Best wishes,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Ajax
Asked by
Markus Jansson
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Markus Jansson
Top achievements
Rank 1
Share this question
or