This question is locked. New answers and comments are not allowed.
I have a simple grid that I would like to display a drop down when in edit mode. The drop down does render and shows the first value but a javascript error is thrown: 'jQuery("#Employee").tDropDownList is not a function'
I can't reproduce this in the online demos but as far as I can tell, I pretty much copied the online demo. I have a sample project I can send if it would help.
Any Ideas what could be causing this?
Thanks,
lmf232s
I can't reproduce this in the online demos but as far as I can tell, I pretty much copied the online demo. I have a sample project I can send if it would help.
Any Ideas what could be causing this?
Thanks,
lmf232s
7 Answers, 1 is accepted
0
Accepted
Hi lmf232s,
There is a known issue that components defined in an edit template do not register their javascript files properly. Fortunately this bug is very easy to fix by modifying the provided source code:
All the best,
Atanas Korchev
the Telerik team
There is a known issue that components defined in an edit template do not register their javascript files properly. Fortunately this bug is very easy to fix by modifying the provided source code:
- Open ViewComponentFactory.cs
- find this method:
public TViewComponent Create<TViewComponent>(Func<TViewComponent> factory) where TViewComponent : ViewComponentBase - Change its implementation with this:
public TViewComponent Create<TViewComponent>(Func<TViewComponent> factory) where TViewComponent : ViewComponentBase
{
TViewComponent component = factory();
scriptRegistrarBuilder.ToRegistrar().Register(component);
return component;
} - Rebuild the project and use the output assembly in your project. Make sure that the solution configuration is set to Release MVC2 NET35 if you are using ASP.NET MVC 2.
All the best,
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
lmf232s
Top achievements
Rank 1
answered on 01 Sep 2010, 03:45 PM
Thanks Atanas worked perfectly!
I suppose I could of just swapped out the Telerik.DropDownList with the basic Html.DropDownList and it would of worked.
I suppose I could of just swapped out the Telerik.DropDownList with the basic Html.DropDownList and it would of worked.
0
lmf232s
Top achievements
Rank 1
answered on 01 Sep 2010, 04:16 PM
Atanas,
I have another issue pertaining to the rebuild of the assemblies. Now that I have rebuild and re-referenced, I get a message that I should be referencing an assembly. The message pops up when I hover over the control (Example Html.Telerik has a red squiggly line under it, hover over it will give you the message). Along with the red squiggly line under the control, the properties are also highlighted in red.
The message is:
Model 'Telerik.Web.Mvc, Version=2010.2.825.235, Culture=neutral, PublickKeyToken=29ac1a93ec063d92' should be referenced
I added this to the web.confg under <assemblies> but this does not seem to fix the issue.
Everything still works, its just kind of annoying!
Any Ideas?
I have another issue pertaining to the rebuild of the assemblies. Now that I have rebuild and re-referenced, I get a message that I should be referencing an assembly. The message pops up when I hover over the control (Example Html.Telerik has a red squiggly line under it, hover over it will give you the message). Along with the red squiggly line under the control, the properties are also highlighted in red.
The message is:
Model 'Telerik.Web.Mvc, Version=2010.2.825.235, Culture=neutral, PublickKeyToken=29ac1a93ec063d92' should be referenced
I added this to the web.confg under <assemblies> but this does not seem to fix the issue.
Everything still works, its just kind of annoying!
Any Ideas?
0
Konrad
Top achievements
Rank 1
answered on 18 Sep 2010, 09:45 PM
Is telerik team going to fix that 'bug' ?
0
Peter
Top achievements
Rank 1
answered on 20 Sep 2010, 07:33 AM
Hi,
I checked the source code of Telerik components and I found that this code snippet, which fix the issue is included.
Regards,
Peter
I checked the source code of Telerik components and I found that this code snippet, which fix the issue is included.
Regards,
Peter
0
Daniel
Top achievements
Rank 1
answered on 10 Nov 2010, 10:49 PM
Hi Atanas.
In my solution, I fix this problem as you mencioned at version Q2 2010 (build 825) (Recompile the dll with the change).
Today I updated my project to the new Q3 2010 (released today) and the error appears again : 'jQuery("#Employee").tDropDownList is not a function'.
I think that the fix is not included yet.
Colud you verify this plis?
Thanks, Daniel.
In my solution, I fix this problem as you mencioned at version Q2 2010 (build 825) (Recompile the dll with the change).
Today I updated my project to the new Q3 2010 (released today) and the error appears again : 'jQuery("#Employee").tDropDownList is not a function'.
I think that the fix is not included yet.
Colud you verify this plis?
Thanks, Daniel.
0
Hello Daniel,
Atanas Korchev
the Telerik team
Please check this forum thread.
Greetings,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