Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
webNumericedit issue
posted

I am enclosing a very simple web pge. It contains 2 controls. If you tab through from the last code it should go to the top control. If I use the webNumericEdit control, I get a runtime error saying that I am trying to set focus to a control that is readonly or hidden. If I change it to a regular textbox it works. I write attribute code in page_load because I cannot find the target control name if I set the java from inside the onBlur event. I really need the webNumeric Edit and I am hoping to be able to keep all of my textboxes as infragistic textboxes so they will all theme the same way. But it is more important to be able to control the tab order. The users do not like hitting te tab on the close button and getting the url bar.

Is there a better way to write this? Any code snippets or sample would be appriciated.

Regards,

Willie

<%@ Page Language="VB" %>
<%@ Register Assembly="Infragistics35.WebUI.WebDataInput.v9.1, Version=9.1.20091.1015, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.WebDataInput" TagPrefix="igtxt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
        Me.p_served.Focus()
        'Me.btnOK.Attributes.Add("onkeydown", ("if(event.which || event.keyCode){if ((event.which == 9) || (event.keyCode == 9)) {document.getElementById('" & Me.p_served.ClientID & "').focus();return false;}} else {return true}; "))
        Me.pbCancelButton.Attributes.Add("onkeydown", ("if(event.which || event.keyCode){if ((event.which == 9) || (event.keyCode == 9)) {document.getElementById('" & Me.p_served.ClientID & "').focus();return false;}} else {return true}; "))
    End Sub
</script>

<script language="javascript" type="text/javascript">
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <!-- <asp:TextBox ID="p_served1" runat="server" Text="0" TabIndex="1" /> -->
        <br />
        <igtxt:WebNumericEdit ID="p_served" runat="server" DataMode="Long" ValueText="0"
            Nullable="False" TabIndex="2">
        </igtxt:WebNumericEdit>
        <br />
        <igtxt:WebImageButton ID="pbCancelButton" runat="server" Text="Close"
            CausesValidation="False" TabIndex="3" >
            <ClientSideEvents Blur="pbCancelButton_Blur" />
        </igtxt:WebImageButton>
    </div>
    </form>
</body>
</html>

 

Parents
No Data
Reply Children
No Data