Mar 21, 2012, 4:23 PM
[CLOSED] Field ReadOnly Javascript
HI, I have a problem, readOnly non work the set client-side,Server-side work ok, here is the example:
2)If click button only with function
3) With Direct and Listener not work.
Also if use readOnly the spinner to right of the field not is show.
Thank
Aurelio
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ARWebRevolution.WebForm1" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" >
</ext:ResourceManager>
<ext:FormPanel ID="FormPanel1" runat="server" ButtonAlign="Right" Height="185" Padding="5"
Title="Title" Width="300">
<Items>
<ext:NumberField ID="NumberField1" runat="server" ReadOnly="true">
</ext:NumberField>
<ext:TextField ID="TextField1" runat="server" >
</ext:TextField>
</Items>
<Buttons>
<ext:Button ID="Button1" runat="server" Icon="Disk" Text="Enable Field">
<Listeners>
<Click Handler="enableField();" />
</Listeners>
</ext:Button>
</Buttons>
</ext:FormPanel>
</form>
<script type="text/javascript" >
function enableField() {
App.NumberField1.readOnly = false;
App.TextField1.readOnly = true;
}
</script>
</body>
</html>
protected void enableField(object sender, DirectEventArgs e)
{
NumberField1.ReadOnly = false;
}
1) If click button only with function listener, readOnly non work2)If click button only with function
<DirectEvents>
<Click OnEvent="enableField" />
</DirectEvents>
it's work ok, 3) With Direct and Listener not work.
Also if use readOnly the spinner to right of the field not is show.
Thank
Aurelio
Last edited by Daniil; Mar 22, 2012 at 6:38 AM.
Reason: [CLOSED]