Current filter:
                                You should refresh the page.
                                1
                                  • nullable type

                                    Exists a editor that handle numeric nullable types, letting the user set its value to null? And then it will be useful for me to have such type of editor.
                                    Now I use the following technique:
                                    associate a WinStringPropertyEditor to a nullable decimal field.
                                    Handle these events in a view controller:

                                            void _importoEdit_ParseEditValue(object sender, ConvertEditValueEventArgs e)
                                            {
                                                TextEdit _importoEdit = sender as TextEdit;
                                                if(e.Value.ToString() == string.Empty)
                                                    e.Value = null;
                                                e.Handled = true;
                                            }

                                            void _importoEdit_FormatEditValue(object sender, ConvertEditValueEventArgs e)
                                            {
                                                if(e.Value != null)
                                                {
                                                    if(e.Value.ToString() == string.Empty)
                                                        e.Value = null;
                                                    else
                                                        e.Value = Convert.ToDecimal(e.Value).ToString("C");
                                                }
                                                e.Handled = true;
                                            }

                                    -----------------

                                    Hi,

                                    By default, the DevExpress.ExpressApp.Win.Editors.WinDecimalPropertyEditor is used to represent values of the decimal type. To force the editor to work with null values, you should set the Properties.AllowNullInput property value to true. Please refer to the editmask thread to learn how to properly access a property editor and change its properties.

                                    See Also:
                                    BooleanPropertyEditor - Nullable property is incorrectly displayed in the DetailView

                                    Thanks,
                                    Plato
                                    -----------------

                                0

                                Support for nullable types on the Web can now be provided for almost all the standard PropertyEditors, because the latest versions of underlying ASPx editors already supports this feature:
                                http://search.devexpress.com/?q=AllowNull&p=T4%7cP5%7c0&d=128
                                http://community.devexpress.com/blogs/aspnet/archive/2011/04/26/asp-net-check-box-new-render-state-for-multiple-controls-coming-soon-in-2011-volume-1.aspx

                                Thanks,
                                Dennis

                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.