Current filter:
                                You should refresh the page.
                                  • Hello,

                                    I have a very similar issue with Enum images in GridControl's excel filter popup dialog as described here https://www.devexpress.com/Support/Center/Question/Details/T727192/winforms-enum-images-are-incorrectly-displayed-in-the-grid-s-column-filter-popup .

                                    Everything works fine until I access list of GridFilterDataItems in GridView.FilterPopupExcelData event. I need to edit default null item caption from default (Null) to czech localization based on type of the GridColumn.

                                    [C#]
                                    private void GridView_FilterPopupExcelData(object sender, DevExpress.XtraGrid.Views.Grid.FilterPopupExcelDataEventArgs e) { var dataItems = e.DataItems.ToArray(); }

                                    After this action, the images are displayed incorrectly in the dialog.This can be seen in the attached image.

                                    Enum in application looks like this

                                    [C#]
                                    public enum TestObjectType { [ImageName("Enum_WorkOrderType_Simple")] Simple = 1, [ImageName("Enum_WorkOrderType_Recurrent")] Recurrent = 4, [ImageName("Enum_WorkOrderType_ConditionBased")] ConditionBase = 8 }

                                    Thank you

                                • Anatol (DevExpress Support) 08.16.2019

                                  Hello,
                                   
                                  I reproduced this issue and forwarded your ticket to our WinForms team for further research. Meanwhile, we would appreciate it if you provide a screenshot demonstrating the required result with the localized null value so that we can make sure that we correctly understand your scenario.

                                • Svatopluk Ulicny 08.19.2019

                                  If object in column is reference type, then I need to show custom text "(prázdný)" instead of the default value (Null). 

                                • Anatol (DevExpress Support) 08.19.2019

                                  Thank you for the clarification. It is now clear to us that the (Null) value customization is not directly related to enumeration columns. As a workaround, you can check the column's FieldName or the property type to avoid querying the e.DataItems collection for enumeration properties:

                                  [C#]
                                  using DevExpress.ExpressApp.Model; using DevExpress.ExpressApp.Win.Editors; IModelColumn columnModel = ((ListView)View).Model.Columns[e.Column.FieldName]; if (columnModel != null && columnModel.PropertyEditorType == typeof(EnumPropertyEditor)) { return; }

                                  Also, note that you can change the null value text without iterating through the e.DataItems collection. This approach does not have the aforementioned side effect either:

                                  [C#]
                                  private void gridView1_FilterPopupExcelData(object sender, DevExpress.XtraGrid.Views.Grid.FilterPopupExcelDataEventArgs e) { e.ChangeText(null, "MyNUll"); }

                                  Nevertheless, our developers will work on this issue, and we will keep you informed of our progress.

                                1 Solution

                                Creation Date Importance Sort by