Posted 15 April 2020, 11:48 am EST - Updated 3 October 2022, 4:41 pm EST
Hi,
What control could i use to create sidebar menu(please see attachment)
Requirements: on click on the top level (no child/items) provide some action
I was trying tabPanel (attachment show tabPanel as a side menu). Looks good but i found some tabPanel limitations for my scenario:
- for complex tab area with big chunk of database data tabPanel loaded/reloaded all tab at once at any get/post action.
- always load tab 0 on page load. I create separated page instead of each tab with the visually identical tabPanel on each. When i try to make specific tab as active it’s come back to tab 0 and as a result load page 0.
var theTabPanel = new wijmo.nav.TabPanel('#theTabPanel', {
selectedIndexChanged: function (s, e) {
alert('current_profile_step ' + current_profile_step);
alert('selectedIndex ' + s.selectedIndex);
DefaultTabImage();
ActiveTabImage(s.selectedIndex);
//if (current_profile_step != s.selectedIndex) {
switch (s.selectedIndex) {
case 0:
window.location.href = currentDomain + "Shared/UserProfile_Info";
break;
case 1:
window.location.href = currentDomain + "Shared/SupplierProfile_CorpAddress";
break;
case 2:
window.location.href = currentDomain + "Shared/SupplierProfile_Contacts";
break;
case 3:
window.location.href = currentDomain + "Shared/SupplierProfile_Services";
break;
case 4:
window.location.href = currentDomain + "Shared/SupplierProfile_Insurance";
break;
case 5:
window.location.href = currentDomain + "Shared/SupplierProfile_Sertification";
break;
default:
// code block
}
//current_profile_step = s.selectedIndex
//}
},
});
//current_profile_step = 4;
theTabPanel.selectedIndex = parseInt(current_profile_step);
DefaultTabImage();
ActiveTabImage(theTabPanel.selectedIndex);
Also, test Menu and TreeView. For both didn’t find how to handle top level click on header. It’s look like both work on items click event. For menu i’m pretty sure l’m mistaken. Menu suppose to work even without child items.