Current filter:
                                You should refresh the page.
                                Support Center
                                  • Hi,

                                    I have a problem with setting the initial value in the combo box for which validation should not pass this value. E.g the combobox has (Please Select) as initial value, and the user can choose whichever countries he/she wants. Validation should not allow (Please Select) to go through and prompt the user to select a country.

                                    This feature was in the original .net controls, but it is not in devexpress's control to set the initial value. Is there a way through it?


                                • Vest (DevExpress Support) 05.24.2011

                                  Hello Jackson,

                                  Thank you for the scenario description. I think that it would be better to create the first item with the Nothing (NULL) value, and then enable the IsRequired validation for the control. If a user does not select other items, the control will try to pass the Nothing value to the server side. Due to validation, this attempt will be canceled.

                                  Please try this approach and let me know if it suits you better.

                                  If I am incorrect in my solution, please clarify your task, so I can give you a better approach.


                                • Jackson Ong 05.24.2011

                                  Hi Vest,

                                  I think i wasnt really clear on what the issue is about. In the original .net RequiredFieldValidator, there is a property call initial value. Where you can set it as the initial value and the validator will not assume it as valid value. My question is how do you set this property in devexpress's control?

                                  I am putting a small piece of code here. Do copy and run it. Click the button and you will know what i mean.

                                          <dx:ASPxComboBox ID="ASPxComboBox1" runat="server" ClientIDMode="AutoID" SelectedIndex="0"
                                                  <dx:ListEditItem Text="(Please Select)" Value="0" />
                                                  <dx:ListEditItem Text="Singapore" Value="1" />
                                                  <dx:ListEditItem Text="Malaysia" Value="2" />
                                              <ValidationSettings ValidationGroup="MST">
                                                  <RequiredField ErrorText="This is a required field" IsRequired="True" />
                                          <br />
                                      <asp:DropDownList ID="DropDownList1" runat="server" ValidationGroup="MST">
                                          <asp:ListItem Selected="True" Value="(Please Select)">(Please Select)</asp:ListItem>
                                          <asp:ListItem Value="1">Singapore</asp:ListItem>
                                          <asp:ListItem Value="2">Malaysia</asp:ListItem>
                                      <br />
                                      <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DropDownList1"
                                          ErrorMessage="This is a required field" InitialValue="(Please Select)" ValidationGroup="MST"></asp:RequiredFieldValidator>
                                      <br />
                                      <br />
                                      <asp:TextBox ID="TextBox1" runat="server" Text="(Please Select)"></asp:TextBox>
                                      <br />
                                      <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox1"
                                          ErrorMessage="This is a required field" InitialValue="(Please Select)" ValidationGroup="MST"></asp:RequiredFieldValidator>
                                      <br />
                                      <asp:Button ID="Button1" runat="server" Text="Button" ValidationGroup="MST" />

                                1 Solution

                                Creation Date Rating Importance Sort by

                                Hello Jackson,

                                Thank you for your clarification.

                                ASPxComboBox does not have such a property. We have the ASPxComboBox - Support NullText for DropDown Mode suggestion about this functionality. Please track this to be notified about our progress. We can offer you a workaround. It is possible to add the required item to the ASPxComboBox and apply a custom validation rule to it. To realize this, set the ValidationSettings.EnableCustomValidation property to true, and handle the ASPxClientEdit.Validation event. Apply the required validation rules. Call the ASPxClientEdit.ValidateGroup in the standard Button ClientClick event handler, because standard buttons do force ASPxEditors validation.

                                You also can use the ASPxButton to more easily validate our controls. By default, page validation is performed when an ASPxButton control is clicked.

                                Attached is a sample.

                                Please let us know whether or not this approach suits your needs. If you need any further help on this subject, please feel free to reactivate this ticket.


                                Note that the NullText functionality is already available starting with version 13.1:
                                DevExpress ASP.NET Combo Box supports Null Text (coming soon in v2013 vol 1)


                                Show all comments
                                • Jackson Ong 05.27.2011

                                  Hi Jenny,

                                  Thanks for the suggestion. I have use a javascript to clear the text when the text is the initial value and validation will work, but I thought that might be a more straight forward solution to it.
                                  Thanks for your help.


                                • Jenny (DevExpress Support) 05.29.2011

                                  Hello Jackson,

                                  We cannot offer you a more straight forward solution because ASPxComboBox doesn't have the required functionality yet.

                                  If you need any further assistance on this subject, please feel free to reactivate this ticket.


                                • mario pastilha 02.15.2013

                                  Hi, is above still the only solution available?

                                  I tried below but it Does NOT display in the combobox

                                  edtSettings.Properties.NullDisplayText = "Select One";

                                • Hello Mario,

                                  I have extracted your comment to a separate ticket created on your behalf to process your inquiry more effectively
                                  Q24926 - ASPxComboBox NullText

                                • Martin F 08.11.2015

                                  Is this really standard feature implemented now?

                                • Hello Martin,

                                  Note that the NullText functionality is already available starting with version 13.1:
                                  DevExpress ASP.NET Combo Box supports Null Text (coming soon in v2013 vol 1)
                                  If this does not meet your requirements, please create a new ticket and describe the task you are trying to accomplish in greater detail. We will do our best to provide you with an appropriate solution.
                                • Fabio Rodrigues 1 02.13.2017
                                  O cara fez uma pergunta simples e o suporte não respondeu.
                                  Eu sempre me aborreço com a Dev Express.
                                • Jenny (DevExpress Support) 02.14.2017
                                  Hello Fabio,

                                  The NullText property is available now. Please see ASPxComboBox.NullText for additional information.

                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2017 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners