We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Menu not grouping items

Hi, 
New to syncfusion and in the process of setting up the master page with a menu as the navbar. I am using asp.net membership so I have preformatted tables and the table I am using is path. It has a PathId and HeaderPathId. I am grouping the items using HeaderPathID, so I have set DataParentIdField="HeaderPathID" but the menu is not creating groups with a drop down, just listing everything side by side. I will copy my menu code below, has anyone come across this before? Or is there something I'm missing?
Thanks

<ej:Menu ID="mnuNavbar" runat="server" DataSourceID="odsMenu" DataIdField="PathId" DataTextField="ItemName" DataParentIdField="HeaderPathID" width="100%">
                    </ej:Menu>

3 Replies

PO Prince Oliver Syncfusion Team October 4, 2017 05:34 AM UTC

Hi Jason,   
  
Thank you for contacting Syncfusion Forums.   
  
This issue can be reproduced, if the parentId and Id fields of the parent and child items are not mapped properly. Make sure that your table has proper Id and ParentId fields with respect to the items and child items. We have prepared a sample for your reference, kindly refer to the following link for the sample: http://www.syncfusion.com/downloads/support/forum/132997/ze/MenuNavBar2129108006 
  
If this does not help, provide us a sample with your table so that we can replicate and debug the issue locally. This should help us narrow down the immediate cause of the problem and provide you solution.   
  
Regards,   
Prince   



JM Jason McDevitt October 4, 2017 07:35 AM UTC

Hi,

Thanks for the reply, I have looked through the example and it is relativly similar to my code. Below is an example of my table where I am pulling the menu items. As you can see the HeaderPathId that I am using as the ParentId is the PathId of the ParentItem. The PathId is the key field in the table. Any help is appreciated. Thanks


Attachment: MenuNavBar_f2095145.zip


PO Prince Oliver Syncfusion Team October 5, 2017 09:21 AM UTC

Hello Jason, 

Thank you for sharing your screenshots and table design. It seems, you did not provide a proper field name for the DataParentIdField field as per your table. It is the cause of the issue. Replacing "HeaderPathID" to "HeaderPathId" will fix it. Refer to the below code.  

<ej:Menu ID="mnuNavbar" runat="server" DataSourceID="odsMenu" DataIdField="PathId" DataTextField="ItemName" DataParentIdField="HeaderPathId" width="100%"></ej:Menu> 

Regards, 
Prince 


Loader.
Up arrow icon