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

[Solved] User control scripts not rendering in the aspx page

3 Answers 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Meenakshi Nagalingam
Top achievements
Rank 1
Meenakshi Nagalingam asked on 10 Aug 2009, 09:58 AM
Hi,

I've created a RAD Grid user control using RAD Controls Q2 2009 release version with java scripts code on client-side. Then i just embed the user control in an aspx page which additionally holds ajax components. 

But while executing, the scripts on the user control were unavailable (throwing object not found error) during run-time. But the web page level scripts are available. 

Do i need to specify some properties to make the user control scripts available in the web page?

Please let me know.

Thanks

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 10 Aug 2009, 12:56 PM
Hi Meenakshi,

Please try to put your user control scripts in a RadScriptBlock control and see if it makes any difference.
For more infromation, please review the following article:
http://www.telerik.com/help/aspnet-ajax/ajxradscriptblockradcodeblock.html

Kind regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Meenakshi Nagalingam
Top achievements
Rank 1
answered on 11 Aug 2009, 06:03 AM
Hi Pavlina,

As specified, i put my user control scripts in RADScriptBlock control and it is working well now. I mean, the user control scripts are being consider in the web page.

But i've another concern here. I couldn't able to access get_masterTableView().rows property. I am getting the following error here:

Microsoft JScript runtime error: 'get_masterTableView().rows.length' is null or not an object

Here is my code block: (in which some properties might refer to older version of the telerik control)
    function fnColumnHeaderChecked(sender, eventArgs) 
    { 
        // Select or deselect all the rows of the grid. 
        for(var nCount = 0; nCount < $find('<%=rgMemberResult.ClientID %>').get_masterTableView().Rows.length; nCount++) 
        { 
            if( columnChecked == true ) 
            { 
                if(!$find('<%=rgMemberResult.ClientID %>').get_masterTableView().rows[nCount].Selected) 
                { 
                    // Select the row. 
                    $find('<%=rgMemberResult.ClientID %>').get_masterTableView().selectRow(radGrid.get_masterTableView().Rows[nCount].Control, false); 
                } 
            } 
            else 
            { 
                // Deselect the row. 
                $find('<%=rgMemberResult.ClientID %>').get_masterTableView().SelectRow(radGrid.get_masterTableView().Rows[nCount].Control); 
            } 
        } 
    } 
 


Please help me out to resolve my issue.

Thanks
0
Pavlina
Telerik team
answered on 11 Aug 2009, 04:21 PM
Hi Meenakshi,

Please review the following forum thread which discuss a similar problem and let me know if it helps to resolve the problem:
http://www.telerik.com/community/forums/aspnet-ajax/grid/rad-grid-client-side-properties.aspx

Kind regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Meenakshi Nagalingam
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Meenakshi Nagalingam
Top achievements
Rank 1
Share this question
or