Check Box issue in Ext.NET

Check Box is showing as button when i am running.. My 'company.ascx' code is like this:

<ext:FormPanel LabelWidth="160" runat="server" ID="CompanyFormPanel" Border="false" IDMode="Static" Padding="10"  Width="1000" Layout="ColumnLayout"  Height="480">
        <Items>
            <ext:FieldSet ID="companyPanel1" runat="server" IDMode="Static" Layout="Form" Border="false" >
            <Defaults>
                <ext:Parameter Name="LabelSeparator" Value=" " />                    
                <ext:Parameter Name="LabelWidth" Value="160" />                    
                <ext:Parameter Name="Width" Value="360" />         
            </Defaults>
                <Items>                   

                   <ext:TextField ID="txtCompanyLoginCode" AllowBlank="false" runat="server" IDMode="Static" Name="CompanyLoginCode" 
                       FieldLabel="Company Login Code"  >                           
                   </ext:TextField>               

                   <ext:TextField ID="txtCompanyTaxID" runat="server" IDMode="Static" Name="CompanyTaxID" FieldLabel="Company TaxID"></ext:TextField>

                   <ext:TextField ID="txtCompanyName" runat="server" IDMode="Static" Name="CompanyName" AllowBlank="false" FieldLabel="Company Name" ></ext:TextField>
                   <ext:TextField ID="txtCompanyAddressLine1" runat="server" IDMode="Static" Name="CompanyAddressLine1"  FieldLabel="Company Address Line1" ></ext:TextField>
                   <ext:TextField ID="txtCompanyAddressLine2" runat="server" IDMode="Static" Name="CompanyAddressLine2" FieldLabel="Company Address Line2"></ext:TextField>

                   <ext:TextField ID="txtComCity" runat="server" IDMode="Static" Name="City" FieldLabel="City" ></ext:TextField>                                            

                 <ext:ComboBox AllowBlank="false" ID="cmbCountries" runat="server" FieldLabel="County" 
                                    Name="CountyCode" ValueField="CountyCode" TypeAhead="true" QueryMode="Local" 
                                    DisplayField="CountyName" StoreID="dsCountries" IDMode="Static">                       
                 </ext:ComboBox> 

                <ext:ComboBox AllowBlank="false" ID="cmbStates" runat="server" FieldLabel="State" 
                    Name="StateCode" ValueField="StateCode" DisplayField="StateCode" QueryMode="Local" 
                    StoreID="dsStates" IDMode="Static"  TypeAhead="true">    

                </ext:ComboBox>                        

                <ext:TextField ID="txtE_Mail" runat="server" IDMode="Static" Name="E_Mail" FieldLabel="Email"  ></ext:TextField>
                 <ext:TextField ID="txtComPhoneNo" runat="server" IDMode="Static" Name="PhoneNo" FieldLabel="PhoneNo" ></ext:TextField>
                 <ext:TextField ID="txtFax" runat="server" IDMode="Static" Name="Fax" FieldLabel="Fax" ></ext:TextField>
                 <ext:TextField AllowBlank="false" ID="txtSyncUser" runat="server" IDMode="Static" Name="SyncUser" FieldLabel="SyncUser"></ext:TextField>
                 <ext:TextField AllowBlank="false" ID="txtSyncPwd" runat="server" IDMode="Static" Name="SyncPwd" FieldLabel="SyncPwd" ></ext:TextField>                 
                 <ext:Checkbox ID="chkEnableMobLogging" Type="Checkbox" runat="server" Name="EnableMobileLogging" IDMode="Static" FieldLabel="Enable Mobile Logging"></ext:Checkbox>                                                                                             
                 <ext:Checkbox ID="chkIsInPosSyncStatus" runat="server" Name="IsInPOSSyncStatus" IDMode="Static" FieldLabel="See Data in POS Sync Status"></ext:Checkbox>    
                </Items>
            </ext:FieldSet>

        </Items>
    </ext:FormPanel>

and when i run the project the html code is showing like this:

<input type="button" hidefocus="true" autocomplete="off" class="x-form-field x-form-checkbox" id="chkEnableMobLogging-inputEl" aria-invalid="false" data-errorqtip="">

Here type is showing as button. It need to be CheckBox. May I know why it is changing and how to make it as checkbox?

Answers:

Answer

The reason is cross-browser compatibility.

Ext.NET/ExtJS renders a Checkbox as

<input type="button">

to have a possibility to stylize it with the same view for all the browsers. It is not possible with native checkboxes.

You can try a native checkbox in FireFox and Chrome and see how different they look.

Though, if ARIA is enabled, there should be "checkbox", there is such the comment in the ExtJS sources (search for "ARIA"):

So, please clarify what is the reason of your need in "checkbox"?

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.