This topic is locked

Using new Where Tab methods

2/6/2020 1:20:57 PM
ASPRunner.NET General questions
Pete K author

A recent maintenance release added two new methods to the Additional WHERE tabs API: setTabShowCount and [size="2"]setTabHideEmpty. But the documentation has not yet been updated. I had to do some experimenting, but I figured out the syntax, in case anyone else is wondering:[/size]

WhereTabs.setTabShowCount(table, id, true/false);

WhereTabs.setTabHideEmpty(table, id, true/false);


For example:

WhereTabs.setTabShowCount("AdminDonations","submitted",true);


[size="2"]Also, I noticed that [/size]WhereTabs.deleteTab doesn't seem to work on tabs created in the GUI. I was trying to add a tab at runtime and remove one created at design time (based on a user role), but was unable to remove the tab created at design time. Also, I wanted my new tab to appear first among the other tabs, but there is no option to determine the order when mixing tabs like this.
So I wound up deleting all where tabs added through the GUI and just added them all in the order I wanted in the event code. This works fine. I guess I don't understand the use case for [size="2"]WhereTabs.deleteTab if it only works on tabs also created using the API code, especially since the API works only in one event. [/size]