This is a migrated thread and some comments may be shown as answers.
ComboBox does not seem to work in a partial view
5 Answers 71 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Frode Solheim
Top achievements
Rank 1
Frode Solheim asked on 02 Sep 2010, 09:44 AM
Hi!

I have done some investigation as I cannot get the ComboBox to bind in a partial view. The following code does not bind and I only get an empty ComboBox.
<%: Html.Telerik().ComboBox().Name("Frode").BindTo((IEnumerable<SelectListItem>)ViewData["Loyver"]) %>
But if i use the Microsoft DropDownList in the same partial view like in the code below it works.
<%: Html.DropDownList("Frode2", (IEnumerable<SelectListItem>)ViewData["Loyver"]) %>

Further, if I move the Telerik ComboBox to a view (not partial) it works. So, am I doing something wrong? Hope for some help here.



5 Answers, 1 is accepted

Sort by
0
Hristo Germanov
Telerik team
answered on 02 Sep 2010, 12:35 PM
Hi Frode Solheim,

I tried to reproduce the problem - to no avail. I am sending my test project for your reference. Could you please examine it and try to reproduce the problem?

Perhaps you are loading the partial view with ajax. In that case I suggest you check this help article.

All the best,
Hristo Germanov
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
Frode Solheim
Top achievements
Rank 1
answered on 02 Sep 2010, 02:48 PM
Hi!

Thanks for your response and sample. Your sample works just fine, but mine does not. The only difference is that I also use a TabStrip for my output. I made a small sample project for you can see. Please download from this link:

Sample project, ComboBox does not bind

As you can see when you run the app the Windows DropDownList binds but not the Telerik ComboBox. What could this be? Yes, I also have tried client side binding, Ajax, but this does also not work. It never calls my class. I hope you can have a look at it. Appreciate help to solve my problem. Thank you!
0
Atanas Korchev
Telerik team
answered on 02 Sep 2010, 03:27 PM
Hi Frode Solheim,

The second part of our previous reply shows how to solve this problem:

"Perhaps you are loading the partial view with ajax. In that case I suggest you check this help article."

Please review the linked help article as well as this one.

Regards,
Atanas Korchev
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
OgOJack
Top achievements
Rank 1
answered on 06 Jul 2011, 01:35 PM
Actually I've faced with the same problem. The solution was - to put JS-registration code to the end of document body.
....
@(Html.Telerik().ScriptRegistrar().Globalization(true))
</body>
0
Alan Mosley
Top achievements
Rank 1
answered on 17 Jul 2012, 01:53 AM
I had ths problem when loading a view into a window, using window.ajaxrefresh(path)
Is this posible with windows, i could not get it to work.
Thanks
Tags
ComboBox
Asked by
Frode Solheim
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Frode Solheim
Top achievements
Rank 1
Atanas Korchev
Telerik team
OgOJack
Top achievements
Rank 1
Alan Mosley
Top achievements
Rank 1
Share this question
or