Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Custom Context Menu View modes: 
User avatar
Member
Member
sean.kinley-techfringe - 12/20/2010 1:13:05 PM
   
Custom Context Menu
I'm working on a custom web part that uses a gridview. I'm trying to add a context menu to the gridview, but I'm having some challenges. The context menu works fine as a regular page outside of Kentico, but once I add it as a web user control I get an error message when I right-click the gridview. The context menu id is 'ContextMenu1' and the error message says 'ContextMenu1_Root is undefined.' I tried to look this up in your documentation to see if could use the context menu web part within Kentico, but I'm not having much luck. Thanks in advance.

Sean

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 12/22/2010 9:38:56 AM
   
RE:Custom Context Menu
Hello,

Have you tried to load your control using "General/ User Control" webpart (if it's possible in your solution)?
Which GridView documentation have you used... that from 5.5R2 Controls Guide?

Optionally please send us an email to support (at kentico.com) with code you're trying to use, so we could help you with our developers.

Regards,
Zdenek

User avatar
Member
Member
sean.kinley-techfringe - 12/22/2010 10:50:16 AM
   
RE:Custom Context Menu
I have not tried the documentation from 5.5R2. I have tried two different methods that I've found online, one was from the MSDN site. They both work outside of Kentico, but once I add the code to my custom webpart I get the object (context menu id) not found error.

I also wasn't aware of the General/User Control method. So, I will try that. First, I will upgrade to 5.5R2 and then try the documenation and the custom user control method. I'll let you know how it goes.

Sean

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 12/23/2010 8:29:38 PM
   
RE:Custom Context Menu
Hi,

Usually the problems with third party (or custom) controls are caused by difference in our controls/webparts lifecycle, especially when standard ASP.NET control is used.
The property is either not available at the moment, or not properly initialized.

As for the documentation - I meant one article not about GridView, which is standard ASP.NET control...
I'm sorry for the confusion ... I meant newly documented UniGrid control... which is something different, and it is described online at http://devnet.kentico.com/docs/controls/unigrid_overview.htm

I will keep you updated within the email and when we find some solution, we can post it here.

Regards,
Zdenek