I am trying to track what a user is doing on a page to prevent them moving off a Page View before saving it, the problem I have is that when they go straight from the changed control to the tab strip the OnValueChanged event of the text box does not fire.
I have created a stripped out page to illustrate the problem which is below, there is no code behind in the demo.
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebApplication1._Default" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <telerik:RadScriptManager runat="server" ID="RadScriptManager1"></telerik:RadScriptManager> <telerik:RadTabStrip runat="server" ID="RadTabStrip1" Align="Justify" AutoPostBack="true" MultiPageID="RadMultiPage1" SelectedIndex="0"> <Tabs> <telerik:RadTab Text="Basic Details" PageViewID="pageBasicDetails"/> <telerik:RadTab Text="Permissions" PageViewID="pagePermissions"/> </Tabs> </telerik:RadTabStrip> <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0" RenderSelectedPageOnly="True"> <telerik:RadPageView runat="server" ID="pageBasicDetails"> <div class="contentWrapper"> <table> <tr> <td> <asp:Label runat="server" ID="lblFirstName" AssociatedControlID="FirstName" Text="First Name"></asp:Label></td> <td> <telerik:RadTextBox runat="server" ID="FirstName" MaxLength="50" Width="300px" Text="John"><ClientEvents OnValueChanged="SetDirty" /></telerik:RadTextBox></td> <td> <asp:RequiredFieldValidator ID="valFirstName" ControlToValidate="FirstName" CssClass="validation" ErrorMessage="First Name is required" runat="server" /></td> </tr> <tr> <td> <asp:Label runat="server" ID="lblLastName" AssociatedControlID="LastName" Text="Last Name"></asp:Label></td> <td> <telerik:RadTextBox runat="server" ID="LastName" MaxLength="50" Width="300px" Text="Smith"><ClientEvents OnValueChanged="SetDirty" /></telerik:RadTextBox></td> <td> <asp:RequiredFieldValidator ID="valLastName" ControlToValidate="LastName" CssClass="validation" Display="Static" ErrorMessage="Last Name is required" runat="server" /></td> </tr> </table> </div> </telerik:RadPageView> <telerik:RadPageView runat="server" ID="pagePermissions"> <div class="contentWrapper"> </div> </telerik:RadPageView> </telerik:RadMultiPage> </div> </form> <script type="text/ecmascript"> function SetDirty(sender, eventArgs) { alert('SetDirty'); }</script></body></html>If you go into the page and edit the first name then move to the last name control, the client side function SetDirty fires as I would expect. If you then change it again but this time click directly to the Permissions tab the SetDirty function does not fire which does not seem correct as the control value is changed and there should still be a blur event.
Can you tell me what I am doing wrong?
