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

Clientside functions don´t work

8 Answers 113 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Elmar
Top achievements
Rank 1
Elmar asked on 02 Jan 2008, 08:51 PM
Hi there.

I have some issues with clientside scripting of the combobox. All the getters and setters donĀ“t work.

Definition:
var combo_route = $get('<%= DropDown_Routes.ClientID %>');
combo_route.set_text(title);

Produces an "is not a function error" (it is not undefined! "ctl00_navisub_DropDown_Routes"). Am I missing something here?

Best regards,
Elamr

8 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 03 Jan 2008, 02:31 PM
Hello Elmar,

I suggest that you try to get the instance of RadComboBox, like:
var combo_route = $find('<%= DropDown_Routes.ClientID %>');

Hope this helps.

Regards,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Elmar
Top achievements
Rank 1
answered on 03 Jan 2008, 03:08 PM

Unfortunately that does not work either.
I think this behavior might be because I am accessing this thing from an external script that is loaded via "script src".

So what I am doing in the page itself is, is to look for the clientid of that control:
var dropdown_routes = $get('<%= DropDown_Routes.ClientID %>');

That works just fine but I canĀ“t access all the telerik custom clientside methods from the external script although the variable itself is declared and filled.

How do I integrate the clientside functions in external scripts? My guess is that this is what 90% of developers use frequently.


0
Jeff
Top achievements
Rank 1
answered on 07 Jan 2008, 03:33 PM
Do you have this in a user control, ascx file? I fought this for days, and some of the items in the help are not the correct syntax either. I am posting a couple of examples below that I hope will help.

Jeff

function

OnClientSelectedIndexChangingDDL(sender, eventArgs)
{
var combo = sender;
var name = combo.get_id();
alert(name);
....

......
clearddl("Usercontrol1_RadComboBox1");
.......

function

clearddl(objSelect)
{
var combo = $find(objSelect);
combo.get_items().clear();
combo.set_text(
"");
}

function

OnClientItemsRequestingDDLFascia(sender, eventArgs)
{
var context = eventArgs.get_context();
context[
"RuleSet"] = "DDLFascia";
context[
"param1"] = document.getElementById("Usercontrol1_RadComboBox1_Input").value;
}

0
Rosi
Telerik team
answered on 07 Jan 2008, 03:51 PM

Hi Elmar,

Please find attached a project illustrating how to achieve your goal. Click the button in the Default.aspx page and test it. If this does not help you, please open a ticket and send us a project illustrating the problem to test it locally.

Regards,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Elmar
Top achievements
Rank 1
answered on 07 Jan 2008, 04:05 PM
Hi there. I actually ended up removing the component because it was too unstable for production use. The async data retrieval worked most of the time but sometimes it would fire an async error. Although this error can be caught and suppressed, it is not a good thing to have unpredictable errors in my app.

Thanks for providing this support anyway!
0
Awais
Top achievements
Rank 1
answered on 18 Mar 2009, 02:25 PM
I am unable to find the selected Index of RadcomboBox ... I am using it on USerControl ... can any one help me out... Thanks
0
Veselin Vasilev
Telerik team
answered on 18 Mar 2009, 02:43 PM
Hello Awais,

Please give us some more details on your implementation.

All the best,
Veselin Vasilev
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Awais
Top achievements
Rank 1
answered on 18 Mar 2009, 03:02 PM
Actually I need to find the Selected Index on Bottom of the Page (UserControl). so i can take Decission based on that SelecetdIndex..

The Problem is this , when i Attached a function in OnclienSelectedIndexChanged Prperty.. It Works Fine.. But If i used to find it outside the function , it gives me error ...

Thanks
Tags
ComboBox
Asked by
Elmar
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Elmar
Top achievements
Rank 1
Jeff
Top achievements
Rank 1
Awais
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or