Tab
A newer version of this page is available. Switch to the current version.

ASPxSpinEdit.AllowNull Property

Gets or sets a value that specifies whether the spin editor allows null values to be entered.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue(true)]
public bool AllowNull { get; set; }
<DefaultValue(True)>
Public Property AllowNull As Boolean

Property Value

Type Default Description
Boolean

true

true if null values can be entered into the editor, otherwise, false.

Remarks

This property is a wrapper of the SpinEditProperties.AllowNull property.

Examples

This example demonstrates how the ASPxSpinEdit's null values accepting behavior can be customized.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" 
Inherits="_Default" %>
<%@ Register assembly="DevExpress.Web.v8.3, Version=8.3.2.0, Culture=neutral, 
PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
</script>

 <html xmlns="http://www.w3.org/1999/xhtml" >
 <head id="Head1" runat="server">
     <title>Accepting Null Values</title>
 </head>
 <body>
     <form id="form1" runat="server">
     <div>
         <br/>
         <table border="0" cellpadding="0" cellspacing="20"><tr>
             <td>AllowNull=True</td>
             <td>AllowNull=False</td>
         </tr><tr>
             <td>
                 <dxe:ASPxSpinEdit ID="ASPxSpinEdit1" runat="server" Number="10" />
             </td>
             <td>
             <dxe:ASPxSpinEdit ID="ASPxSpinEdit2" runat="server" AllowNull="False" Number="10" />
             </td>
         </tr></table>
     </div>
     </form>
 </body>
 </html>
See Also