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

[Solved] NestedViewTemplate Can't load javascript

1 Answer 137 Views
Grid
This is a migrated thread and some comments may be shown as answers.
gogo leung
Top achievements
Rank 1
gogo leung asked on 06 Dec 2009, 09:32 AM
Hi All,
I found that when I put a custom user control(I call it Parent User Control below) between <NestedViewTemplate ></NestedViewTemplate >.
And the Parent User Control also have another User Control(I call it Children User Control). The Children User Control has some script code between <RadCodeBlock ></RadCodeBlock >. But when the RadGrid renders, I found that the Children User Control's script code between <RadCodeBlock ></RadCodeBlock > can't be loaded? Could anyone tell me how to solve this problem? Thank you in advance.

My Code:

......
<
NestedViewTemplate > 
       <Test:TaskControl ID="TaskControlMain" runat="server" /> 
</NestedViewTemplate>
........

Parent User Conrol "TaskControl.ascx":

<DIV>
<Test:flowAssignee ID="Assignee" runat="server" />
<DIV>
 

Children User Control "flowAssignee.ascx":

<DIV> 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
    <script type="text/javascript"
         function checkAssignee() 
         { 
            alert("2323") 
         }  
</script> 
</telerik:RadCodeBlock> 
<div> 
    <telerik:RadTextBox ID="Relationship" runat="server" onblur="checkAssignee" Width="200" /> 
</div> 
 
 

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 07 Dec 2009, 08:20 AM
Hi,

Please use RadScriptBlock instead! You can check this article for more info.

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
gogo leung
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or