KaxTabControlOnClientTabSelecting Property |
Namespace: Kettic.AspNet.Controls
Use the OnClientTabSelecting property to specify a JavaScript function that will be executed prior to tab selecting - either by left-clicking it with a mouse or hitting enter after tabbing to that tab. You can cancel that event (prevent tab selecting) by seting the cancel property of the event argument to true.
Two parameters are passed to the handler
<script language="javascript">
function ClientTabSelectingHandler(sender, eventArgs)
{
var tabControl = sender;
var tab = eventArgs.get_tab();
alert("You will be selecting the " + tab.get_text() + " tab in the " + tabControl.get_id() +
" tabcontrol.");
if (tab.Text == "Education")
{
alert("Education cannot be selected");
eventArgs.set_cancel(true);
}
}
</script>
<kettic:KaxTabControl id="KaxTabControl1" runat="server"
OnClientTabSelecting="ClientTabSelectedHandler">
<Tabs>
<kettic:KaxTab Text="Personal Details"></kettic:KaxTab>
<kettic:KaxTab Text="Education"></kettic:KaxTab>
<kettic:KaxTab Text="Computing Skills"></kettic:KaxTab>
</Tabs>
</kettic:KaxTabControl>