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

Client side selection and server side inside RadAjaxPanel

4 Answers 76 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
David Cohen
Top achievements
Rank 1
David Cohen asked on 13 May 2010, 02:24 PM
Hi there

I have a problem and hope you can help me.
I have a page contain 3 combo boxes (let's call them A B C), which fill 2 other combo boxes (D E) using AJAX.
The fill is, of course, on the server.
D and E are contained inside RadAjaxPanel (In order to use ajax)

It's working very good. D and E get the proper data, the ajax works fine.

Now, here is the problem.
When selecting an item in combo D, I want to select the first item of E (first item which contain text like "Select..." and value of empty string).
And also vise versa:
When selecting an item in combo E, I want to select the first item of D.

I tryed to use OnClientSelectIndexChanged, and combo.Items[0].Select(), but this cause stack overflow (I changed D, which changed E, which canged D,,,,, )
Also, The server side selected index changed was not fired. why is that ?

I hope you can help me.
Thanks
Dudu

4 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 14 May 2010, 08:04 AM
Hi David,

Have you checked our online example about related comboboxes here, it demonstrates similar approach.
Regarding the server-side SelectedIndexChanged event,  you should set AutoPostBack property to "true" in order to be fired.

I hope this helps.

All the best,
Yana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
David Cohen
Top achievements
Rank 1
answered on 16 May 2010, 07:08 AM
Thanks

Actually, I cannot see the code in the link you sent.
When I select one of the tabs, a loading icon is shown but the tab is not shown and the icon stays there

I'll try to check it few more times
thanks for your help
David
0
David Cohen
Top achievements
Rank 1
answered on 16 May 2010, 08:04 AM
Hi

One more thing.
In the example you sent, the items are clear and request from the server.
In my case, and I don't know if you support it, I don't want to request the items, just want to reset the selection to the first item.
Once again, the two combo boxes reset each other (selecting one will reset the other one)

For instance, first combo is client name. Second is Id
I want to select a client by Id OR by Name. (When selecting in one combo I don't need to find the match client item in the other combo)

I really hope you can help me.
Thanks
Dudu
0
Yana
Telerik team
answered on 20 May 2010, 09:05 AM
Hi David,

I'm sorry for my misunderstanding.

You can achieve this with the help of custom attributes, please check the attached page which demonstrates this approach, download it and give it a try.

Greetings,
Yana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ComboBox
Asked by
David Cohen
Top achievements
Rank 1
Answers by
Yana
Telerik team
David Cohen
Top achievements
Rank 1
Share this question
or