Jan 26, 2017, 5:39 AM
[OPEN] [#1421] [4.2.0] After Render RadioGroup Items reset the checked one
Hello,
I have a window that contains a Radigroup, on checking a radio item in the RadioGroup I want to change the RTL property of the window and render it again, in 4.2 when rendering the window it is resetting the checked Radio, in 4.1 this issue was not detected.
Please refer to the test case below.
Thank you
I have a window that contains a Radigroup, on checking a radio item in the RadioGroup I want to change the RTL property of the window and render it again, in 4.2 when rendering the window it is resetting the checked Radio, in 4.1 this issue was not detected.
Please refer to the test case below.
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Simple Array Grid With Paging and Remote Reloading - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />
<script type="text/javascript">
function ChangeInterfaceLanguage(item, newValue, oldValue)
{
//console.log("newValue", newValue);
//alert(newValue.RadioGroup2);
//console.log("oldValue", oldValue);
//console.log("item.getChecked()", item.getChecked());
App.direct.UpdateContainer();
}
</script>
<script runat="server">
[DirectMethod]
public void UpdateContainer()
{
Window1.Render();
}
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:Window
ID="Window1"
runat="server"
Closable="false"
Resizable="false"
Height="200"
Icon="Lock"
Title="Login"
Draggable="false"
Width="350"
Modal="false"
BodyPadding="5"
Layout="FormLayout"
Y="320"
Region="Center" >
<Items>
<ext:TextField
ID="txtUsername"
runat="server"
FieldLabel="UserName"
AllowBlank="false"
BlankText="Your username is required."
LabelCls="LabelStyle"
>
<Listeners>
<SpecialKey Handler="
if (e.getKey() == e.ENTER) {
e.stopEvent();
App.Button1.fireHandler();
}
">
</SpecialKey>
</Listeners>
</ext:TextField>
<ext:TextField
ID="txtPassword"
runat="server"
InputType="Password"
FieldLabel="Password"
AllowBlank="false"
BlankText="Your password is required."
LabelCls="LabelStyle"
autocomplete="new-password"
>
<Listeners>
<SpecialKey Handler="
if (e.getKey() == e.ENTER) {
e.stopEvent();
App.Button1.fireHandler();
}
">
</SpecialKey>
</Listeners>
</ext:TextField>
<ext:RadioGroup
ID="RadioGroup2"
runat="server"
GroupName="RadioGroup2"
ColumnsWidths="200,200">
<Items>
<ext:Radio runat="server" ID="Arabic" LabelAlign="Right" BoxLabel="عربي" InputValue="ar" Checked="True"/>
<ext:Radio runat="server" ID="English" LabelAlign="Right" BoxLabel="English" InputValue="en" />
</Items>
<Listeners>
<Change Fn="ChangeInterfaceLanguage" />
</Listeners>
</ext:RadioGroup>
</Items>
<Buttons>
<ext:Button ID="Button1" runat="server" MinWidth="150" Text="Login" Icon="Accept">
<Listeners>
<Click Handler="VerifyCredentials()">
</Click>
</Listeners>
</ext:Button>
</Buttons>
</ext:Window>
</form>
</body>
</html>
Thank you