Navbar groups issue

0
0

 

Based on the youtube tutorial to create wisej apps, I’m using this code to create 2 groups in the navbar:
NavBarGroup = “Admin”;
AddNavItem(NavBarGroupItem, “Clients”, “Users.svg”, item => CreateMdiChildForm<frmClients>(nameof(frmClients)));
AddNavItem(NavBarGroupItem, “IT Test”, “Users.svg”, item => CreateMdiChildForm<frmITTest>(nameof(frmITTest)));

NavBarGroup = “ESS”;
AddNavItem(NavBarGroupItem, “Leave Request”, “Users.svg”, item => CreateMdiChildForm<frmLeaveRequestWorkflow>(nameof(frmLeaveRequestWorkflow)));

 

This is the desired result:

  • Admin
    • Clients
    • IT Test
  • ESS
    • Leave Request

But this is not working, after investigating the code I found out that once NavBarGroupItem is called for the first time, the navbaritem is created and it will NOT be created another time whenever NavBarGroup is changed.

 

Joe maybe the best fit to answer this question because he created the videos.

Best regards,

Ali

  • You must to post comments
0
0

congratulations, you found a bug 🙂
Please change the NavBarGroup property in BaseMainForm.cs to the following and it should work:

protected string NavBarGroup
{
get => _NavBarGroup;
set
{
_NavBarGroup = value;
_NavBarGroupItem = null;
}
}
protected string _NavBarGroup;

 

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.