[CLOSED] The Property "checked" of a Checkbox ist not set, when it create through a DirectMethod

  1. #1

    [CLOSED] The Property "checked" of a Checkbox ist not set, when it create through a DirectMethod

    Hello,

    I create through the DirectMethod "GetCheckbox" a checkbox element in a panel toolbar. But the property "Checked" of the checkbox-element is not set. I used the Ext-Version 3.0.0.

    
    <body>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            <ext:ResourceManager ID="RSM" runat="server" EnableViewState="true" AjaxViewStateMode="Enabled"></ext:ResourceManager>
            <table>
                <tr>
                    <td>
                        <ext:Button ID="cmdGet" Icon="Add" runat="server">
                            <Listeners>
                                <Click Handler="App.direct.GetCheckbox()"></Click>
                            </Listeners>
                        </ext:Button>
                    </td>
                </tr>
                <tr>
                    <td>
                        <ext:Container ID="Con" runat="server" Height="500" Width="500">
                        </ext:Container>
                    </td>
                </tr>
            </table>
        </form>
    </body>
    
    <Ext.Net.DirectMethod>
        Public Sub GetCheckbox()
    
            Dim oPanel As Ext.Net.Panel
            Dim oToolbar As Ext.Net.Toolbar
            Dim ocheckbox As Ext.Net.Checkbox
    
            oPanel = New Ext.Net.Panel
            With oPanel
                .ID = "myPanel"
                .Height = System.Web.UI.WebControls.Unit.Pixel(200)
                .Width = System.Web.UI.WebControls.Unit.Pixel(200)
                .Title = "mypanel"
                oToolbar = New Ext.Net.Toolbar
                With oToolbar
                    .ID = "mytoolbar"
                End With
                .TopBar.Add(oToolbar)
    
                ocheckbox = New Ext.Net.Checkbox
                With ocheckbox
                    .ID = "mycheckbox"
                    .Checked = True
                    .FieldLabel = "checkbox"
                End With
                oToolbar.Add(ocheckbox)
            End With
            Con.Add(oPanel)
            Con.UpdateContent()
        End Sub

    Can you please help with this case?

    Thanks in advance
    Last edited by Daniil; Feb 02, 2015 at 9:48 AM. Reason: [CLOSED]
  2. #2
    Hi @Woyciniuk,

    Thank you for the report! It is a known issue.
    https://github.com/extnet/Ext.NET/issues/251

    As a workaround you can set up a Checkbox's IsDynamic property to true as suggested here:
    http://forums.ext.net/showthread.php...l=1#post105321
  3. #3
    Hi Daniil,

    Thanks for your help. The workaround works and you can close the case.

    @Woyciniuk

Similar Threads

  1. Replies: 4
    Last Post: Jul 30, 2013, 5:29 PM
  2. [CLOSED] Problem to use property "Maximized" from "Window"
    By avante in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 22, 2013, 12:47 AM
  3. Replies: 1
    Last Post: Oct 05, 2012, 11:56 AM
  4. Replies: 1
    Last Post: Jun 26, 2012, 11:29 AM
  5. Replies: 2
    Last Post: Mar 19, 2011, 1:17 PM

Tags for this Thread

Posting Permissions