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 .

                                    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.

                                    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

                                    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

                                  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:

                                  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:

                                  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