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

RadContextMenu JS Error

7 Answers 105 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Veteran
Andrew asked on 17 Feb 2011, 06:20 PM
I get this error when I click on a menu item in my contectmenu the is located in a radgrid

any idea?

here is the error I get in chrome:

  1. Uncaught TypeError: Cannot set property 'control' of undefined
here is what I get from IE8 and vs2010:

VS210:

    - Microsoft JScript runtime error: Object doesn't support this property or method

}var H=G._getScrollWrapElement();
if(!H){return;
}var z=G._scroller;
if(!z){return;
}var N=G._flow||G.get_groupSettings().get_flow();   - on this line
var L=N==b.ItemFlow.Vertical;
H[L?"scrollTop":"scrollLeft"]=0;
var E=G.get_childListElement();

IE8:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; .NET CLR 3.5.21022; .NET4.0C; .NET4.0E; SLCC1; InfoPath.3)
Timestamp: Thu, 17 Feb 2011 17:19:52 UTC

Message: Object doesn't support this property or method
Line: 8663
Char: 2
Code: 0
URI: http://biz-devapps.ivey.ca/eZone/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bAjaxControlToolkit%2c+Version%3d4.1.40412.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d28f01b0e84b6d53e%3aen-US%3aacfc7575-cdee-46af-964f-5d85d9cdcf92%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.3.1317.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a9506cff2-3a86-46c5-b869-6ba1478f3c27%3a16e4e7cd%3a58366029%3af7645509%3a24ee1bba%3ae330518b%3a1e771326%3ac8618e41%3ae4f8f289%3a19620875%3a874f8ea2%3af46195d3%3a490a9d4e

 


7 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 18 Feb 2011, 09:35 AM
Hello Andrew,

We're sorry for the issue you're experiencing.

Could you please give us more details about your scenario and how to reproduce this error? Thanks

Kind regards,
Yana
the Telerik team
0
Seth
Top achievements
Rank 1
answered on 02 Sep 2011, 02:25 PM
I'm encountering the same error.

I declare a empty context menu with DefaultGroupSettings Height of 100px in html:

<rad:RadContextMenu ID="TreeMenu" runat="server" EnableEmbeddedBaseStylesheet="true" OnClientItemClicked="TreeContextMenuItemClicked_Handler" OnClientShowing="ShowingAddMenu_Handler">
  <DefaultGroupSettings Height="100" />
</rad:RadContextMenu>

In response to a button click, I add items to the context menu using javascript and display the menu (this is a contrived example, but representative of what the code is doing):

function ShowMenu()
{
  var MenuToLoad = $find("<%= TreeMenu.ClientID %>");
  var MenuItems = MenuToLoad.get_items();
  MenuItems.clear();  
 
  var ThisItem = new Telerik.Web.UI.RadMenuItem();
  ThisItem.set_text("Item 1");
  MenuItems.add(ThisItem);
 
  var ThisItem2 = new Telerik.Web.UI.RadMenuItem();
  ThisItem2.set_text("Item 2");
  MenuItems.add(ThisItem2);
         
  var ThisItem3 = new Telerik.Web.UI.RadMenuItem();
  ThisItem3.set_text("Item 3");
  MenuItems.add(ThisItem3);
 
  MenuToLoad.showAt(10,10);
}

The error is generated any time one of the items is clicked in the displayed menu.
0
Andrew
Top achievements
Rank 1
Veteran
answered on 02 Sep 2011, 02:32 PM
I don't know it this will help but make sure you have a radscriptmanager on the page and/or ajax manager
0
Seth
Top achievements
Rank 1
answered on 02 Sep 2011, 03:17 PM
Andrew,

Thank you for the suggestion, but I do have an ASP.NET Script Manager on the page.

Were you able to overcome the error?

Seth
0
Andrew
Top achievements
Rank 1
Veteran
answered on 02 Sep 2011, 03:20 PM
ya we did but, there was acutally many issues...

I think it had something to do with using the ajaxtoolkit and the telerik toolsin the same site
0
Seth
Top achievements
Rank 1
answered on 02 Sep 2011, 03:26 PM
That would be a major bummer.  The form in question does make use of the AjaxControlToolkit.

Hopefully someone from Telerik can chime in with a suggestion.
0
Peter
Telerik team
answered on 08 Sep 2011, 09:17 AM
Hello Seth,

Could you please try adding a dummy menu item and check if this helps?
<telerik:RadContextMenu ID="TreeMenu" runat="server">
       <Items>
           <telerik:RadMenuItem>
           </telerik:RadMenuItem>
       </Items>
       <DefaultGroupSettings Height="100" />
   </telerik:RadContextMenu>


Kind regards,
Peter
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Menu
Asked by
Andrew
Top achievements
Rank 1
Veteran
Answers by
Yana
Telerik team
Seth
Top achievements
Rank 1
Andrew
Top achievements
Rank 1
Veteran
Peter
Telerik team
Share this question
or