"object reference not set to instance of an object" ContexMenu Error

3 posts, 0 answers
  1. Ben Turpin
    Ben Turpin avatar
    27 posts
    Member since:
    Jun 2008

    Posted 08 Aug 2008 Link to this post

    Hello.

    I created a context menu from the radreeview properties. When I create a new ContextMenu and click in  Items to add new items it works fine, but after a while (I don't know when exactly) when I try to access the Items properties of the MenuContext a visual studio message box appears with this message: "Object neference not set to an Isntance of an object".

    I didn't touch the aspx markup:
        <telerik:RadTreeView ID="RadTreeView1" Runat="server"  
            LoadingStatusPosition="BeforeNodeText"  
            onclientcontextmenushowing="OnContextShowing"
            <contextmenus> 
                <telerik:RadTreeViewContextMenu ID="MenuContextMenu" runat="server"  
                    Flow="Horizontal"
                    <expandanimation type="OutQuart" /> 
                    <defaultgroupsettings expanddirection="Auto" flow="Vertical" /> 
                    <collapseanimation duration="200" type="OutQuint" /> 
                    <Items> 
                        <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Add "  
                            Value="add"
                            <groupsettings expanddirection="Auto" flow="Vertical" /> 
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem runat="server" ExpandMode="ClientSide" Text="Delete "  
                            Value="delete"
                            <groupsettings expanddirection="Auto" flow="Vertical" /> 
                        </telerik:RadMenuItem> 
                    </Items> 
                </telerik:RadTreeViewContextMenu> 
            </contextmenus> 
            <Nodes> 
                <telerik:RadTreeNode runat="server" ExpandMode="ClientSide"  
                    Text="Context Menu Test" Value="1"
                </telerik:RadTreeNode> 
            </Nodes> 
            <CollapseAnimation Type="OutQuint" Duration="100"></CollapseAnimation> 
     
            <ExpandAnimation Type="OutQuart" Duration="100"></ExpandAnimation> 
        </telerik:RadTreeView> 

    The project runs fine even when I modify the markup manually, it might be a VS interaction issue. Any ideas?
  2. Erjan Gavalji
    Admin
    Erjan Gavalji avatar
    1455 posts

    Posted 11 Aug 2008 Link to this post

    Hi Ben,

    This seems like a glitch in the RadTreeViewContextMenu designer. Can you elaborate a bit finding the exact steps to reproduce the problem and report them to us?

    Kind regards,
    Erjan Gavalji
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Paul
    Paul avatar
    2 posts
    Member since:
    Oct 2008

    Posted 19 Nov 2008 Link to this post

    Hello,

    I'm experiencing the same. I have also noticed that the list of the context menus on the left hand side lists both of the context menus I have created as RadTreeViewContextMenu and not the IDs that I have assigned to the contextmenus.

    Renaming the IDs back to RadTreeViewContextMenu1 and RadTreeViewContextMenu2 does not make a difference.

    I do have two treeview controls on the page if that makes a difference.

    I am using VWD2008 Express.

    Thanks

    Paul

Back to Top