Sep 14, 2018, 3:57 PM
Checkbox not "checked" across major Ext.net versions
I have recently come across what looks to me, a very strange bug.
The code below does not work as expected, when you click on the button a panel with a checkbox is added to the tabbed panel, the bug is made manifest when you notice that the checkbox has a
Either there's a bug or I'm missing something very basic here. I have been able to reproduce this issue in Ext.net 2.5.3, 3.3 and the latest 4.7.1.
The code below does not work as expected, when you click on the button a panel with a checkbox is added to the tabbed panel, the bug is made manifest when you notice that the checkbox has a
Checked = true
property, however, it is not rendered that way.Either there's a bug or I'm missing something very basic here. I have been able to reproduce this issue in Ext.net 2.5.3, 3.3 and the latest 4.7.1.
<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true" %>
<script runat="server">
public void addPanel(Object sender, DirectEventArgs e)
{
FormPanel panel = new FormPanel();
panel.ID = "myForm";
panel.Width = 500;
panel.Layout = "FormLayout";
panel.Title = "test form";
panel.Add(new Ext.Net.Checkbox { ID = "myCheckbox", FieldLabel = "my checkbox", Checked = true });
uiCanva.Add(panel);
panel.Render();
uiCanva.SetActiveTab(0);
}
</script>
<!DOCTYPE html>
<html lang="en">
<head runat="server">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%: Page.Title %> - My ASP.NET Application</title>
</head>
<body>
<ext:ResourceManager runat="server" Theme="Triton" />
<form>
<div style="margin-left:20px;">
<ext:Button ID="myButton" runat="server" Text="clickme">
<DirectEvents>
<Click OnEvent="addPanel" />
</DirectEvents>
</ext:Button>
<ext:TabPanel ID="uiCanva" runat="server" Region="Center" Title="Tabs Forms" Layout="FormLayout" Border="false" Frame="false" BodyPadding="10" Height="500" Width="600">
</ext:TabPanel>
</div>
</form>
</body>
</html>