Solved

what is wrong with this syntax ?

Posted on 2009-06-29
2
376 Views
Last Modified: 2012-05-07
I am getting a javascript error when I put this syntax on aspx page - what is wrong with this  OnClientSelectedIndexChanged='<%# "ShowPercentage(\"" + Container.FindControl("rcbActivityCodes").ClientID + "\",  \"" + Container.FindControl("rntPercentage").ClientID + "\")" %>' ?  
                 
<telerik:RadComboBox ID="rcbActivityCodes"  EnableAjaxSkinRendering="true" runat="server"

                       OnClientSelectedIndexChanged='<%# "ShowPercentage(\"" + Container.FindControl("rcbActivityCodes").ClientID + "\",  \"" + Container.FindControl("rntPercentage").ClientID + "\")" %>' >

Open in new window

0
Comment
Question by:tech_question
2 Comments
 
LVL 39

Expert Comment

by:abel
ID: 24740278
That depends on what that renders to when your page is loaded and/or whether ShowPercentage does not exist and/or what error you get. Can you update with answers to these three questions?
0
 
LVL 12

Accepted Solution

by:
wht1986 earned 500 total points
ID: 24740322
On the telerik controls, you can specify that function.  OnClientSelectedIndexChanged has a specific signature it looks for.  Please see the documentation here
http://www.telerik.com/help/aspnet-ajax/combo_clientsideonclientselectedindexchanged.html

basically all you can do is specify the name of the jabascript method
<telerik:RadComboBox  ID="RadComboBox1"  runat="server" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged" />

The parameter values are set by telerik code
function OnClientSelectedIndexChanged(sender, eventArgs)
{
 var item = eventArgs.get_item();
 sender.set_text("You selected " + item.get_text());
}
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
javascript call 6 35
ASP.Net Session State alternatives 3 26
Image(7) 1 33
Adjust the position 3 7
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now