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

[Solved] onclientselectedindexchanged problem in multiple combo box

3 Answers 191 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
laxmi
Top achievements
Rank 1
laxmi asked on 16 Jun 2008, 09:58 AM
Hi,



I have some a multiple combo boxes on client selected  index changed of 1st should appear 2nd on client selected  index changed of 2nd should appear 4 labels.
For drop downs itz done by using itemsrequested event.For labels i have written the code in selected index changed on server side.But i need it on client selected index changed.

I know it's very simple problem as i am new to using rad controls, i am facing some difficulty.

Any Suggetions??

Thanks in advance.

Regards,
Laxmi

3 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 16 Jun 2008, 11:04 AM
Hello Laxmi,

I suggest you wrap the labels with a div which has style="display:none". Then you can make this div visible in the event handler of OnClientSelectedIndexChanged event .

For example:
<script>  
function OnClientSelectedIndexChanged ()  
{  
    var myDiv = document.getElementById("div1");  
    myDiv .style.display= "block";  
 
}  
 
</script> 


All the best,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
laxmi
Top achievements
Rank 1
answered on 16 Jun 2008, 01:50 PM
Thanks for your reply.

I need to bind data in the labels depends on selected item of combo box(i am excuting db query depends on selected item).

Like the items requested, i need to send id and retrieve values according to that id.

how can i access server method?

Thanks in advance.

Laxmi.
0
Rosi
Telerik team
answered on 17 Jun 2008, 01:09 PM
Hello Laxmi,

In this case I suggest you execute your logic on the server in OnSelectedIndexChanged event instead of on the client side .

However, you can use RadAjaxManager and call its ajaxRequest method in OnClientSelectedIndexChanged event.

Then you can set the Text property of the label controls in AjaxRequest event.

Please follow the link -http://www.telerik.com/help/aspnet-ajax/ajxonajaxrequest.html

Sincerely yours,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ComboBox
Asked by
laxmi
Top achievements
Rank 1
Answers by
Rosi
Telerik team
laxmi
Top achievements
Rank 1
Share this question
or