Posted 26 October 2020, 11:08 pm EST
<%@ Register assembly="C1.Web.Wijmo.Controls.4" namespace="C1.Web.Wijmo.Controls.C1Tabs" tagprefix="wijmo" %>
...
<script type="text/javascript" id="validation">
...
function SetFilterText() {
var lsFilter = null;
...
if (rbllist[3].checked)
{ //FILTER_FIRST:
if (<%= FOTabStrip1.ClientID%>) {
var lilist = $('[id="<%= FOTabStrip1.ClientID%>"]').find("li");
var lichecked = lilist.find(x => x.checked === true);
if (lichecked.length != 0) {
lsFilter = "Product description starts with '" + lichecked[0].text + "'";
}
else {
lsFilter = "Product description starts with (any)";
}
}
}
<%= lblFilterDesc.ClientID%>.Text = lsFilter;
}
</script>
...
<div runat="server" id="divtabstrip" style="width: 80%; padding: 10%; height: 30%;float:left; ">
<wijmo:C1Tabs ID="FOTabStrip1" AutoPostBack="false" runat="server" OnClientSelect="SetFilterText()" OnSelectedChanged="FOTabStrip1_SelectionChanged" Height="100%" Width="100%">
<Pages>
<wijmo:C1TabPage ID="C1Tabs1_A" runat="server" StaticKey="a" Text="A" >
</wijmo:C1TabPage>
<wijmo:C1TabPage ID="C1Tabs1_B" runat="server" StaticKey="b" Text="B">
</wijmo:C1TabPage>
...
</wijmo:C1TabPage>
</Pages>
</wijmo:C1Tabs>
</div>
<div runat="server" id="filterdesc" style="width: 100%; height: 20%; float: left">
<div class="brownlabel2" style="width: 80%;">
<div style="width:100%;height:15%"></div>
Current Filter: <asp:label runat="server" ID="lblFilterDesc" Text="" />
</div>
</div>
The setFilterText() javascript function is only being run at page load. I’ve tried to manually add onclick events to the tabs but it adds click to the tab body not the index header (these are all that is visible).
How can I add a client side event to the tab header so that when it gets clicked i can change the label filter text to "Filter starts with (tabtext) "
I can’t find any documentation for client side onclick events.
this is wijmo 4.0.20201.326 in studio 2017.
any help appreciated.