private void InitGridLignes()
        {
            // intializer la gride
            foreach (var zone in _controller.GetZoneValues())
            {
                if (!zone.EditingInGrid)
                {
                    continue;
                }

                switch (zone.Type)
                {
                case ZoneType.D:
                    var repoDate = new RepositoryItemDateEdit();
                    gvLignesAnnexes.Columns.Add(new GridColumn
                    {
                        Caption    = zone.Code,
                        FieldName  = zone.PropertieFieldName,
                        ColumnEdit = repoDate,
                        Visible    = true
                    });
                    break;

                case ZoneType.N:

                    var repoDecimal = new RepositoryItemTextEdit
                    {
                        Mask =
                        {
                            MaskType         = MaskType.Numeric,
                            EditMask         = "n3",
                            ShowPlaceHolders = false
                        },
                        DisplayFormat =
                        {
                            FormatType   = FormatType.Numeric,
                            FormatString = "n3"
                        },
                        MaxLength = 15
                    };
                    gvLignesAnnexes.Columns.Add(new GridColumn
                    {
                        Caption    = zone.Code,
                        FieldName  = zone.PropertieFieldName,
                        ColumnEdit = repoDecimal,
                        Visible    = true
                    });
                    break;

                case ZoneType.I:
                    var repoInterger = new RepositoryItemTextEdit
                    {
                        Mask =
                        {
                            MaskType         = MaskType.Numeric,
                            EditMask         = "n0",
                            ShowPlaceHolders = false
                        },
                        DisplayFormat =
                        {
                            FormatType   = FormatType.Numeric,
                            FormatString = "n0"
                        },
                        MaxLength = 15
                    };
                    gvLignesAnnexes.Columns.Add(new GridColumn
                    {
                        Caption    = zone.Code,
                        FieldName  = zone.PropertieFieldName,
                        ColumnEdit = repoInterger,
                        Visible    = true
                    });
                    break;

                case ZoneType.E:
                    var repoEnum = new RepositoryItemImageComboBox();
                    repoEnum.Items.AddEnum(zone.EnumType);
                    gvLignesAnnexes.Columns.Add(new GridColumn
                    {
                        Caption    = zone.Code,
                        FieldName  = zone.PropertieFieldName,
                        ColumnEdit = repoEnum,
                        Visible    = true
                    });
                    break;

                case ZoneType.X:
                    var repoString = new RepositoryItemTextEdit();
                    gvLignesAnnexes.Columns.Add(new GridColumn
                    {
                        Caption    = zone.Code,
                        FieldName  = zone.PropertieFieldName,
                        ColumnEdit = repoString,
                        Visible    = true
                    });
                    break;
                }
            }

            gvLignesAnnexes.BestFitColumns();

            gvLignesAnnexes.OptionsSelection.EnableAppearanceFocusedCell = false;
            gvLignesAnnexes.OptionsSelection.EnableAppearanceFocusedRow  = true;
            gvLignesAnnexes.FocusRectStyle = DrawFocusRectStyle.RowFullFocus;
            gvLignesAnnexes.Appearance.FocusedRow.BackColor             = Color.FromArgb(255, 255, 192);
            gvLignesAnnexes.Appearance.SelectedRow.BackColor            = Color.FromArgb(255, 255, 192);
            gvLignesAnnexes.Appearance.OddRow.BackColor                 = Color.FromArgb(231, 244, 247);
            gvLignesAnnexes.OptionsView.EnableAppearanceOddRow          = true;
            gvLignesAnnexes.Appearance.SelectedRow.Options.UseBackColor = true;
            gvLignesAnnexes.OptionsBehavior.Editable           = true;
            gvLignesAnnexes.OptionsDetail.EnableMasterViewMode = false;
            gvLignesAnnexes.OptionsBehavior.Editable           = false;
            gvLignesAnnexes.OptionsSelection.MultiSelect       = true;

            gvLignesAnnexes.OptionsView.ShowAutoFilterRow         = true;
            gvLignesAnnexes.OptionsFilter.DefaultFilterEditorView = FilterEditorViewMode.VisualAndText;
            gvLignesAnnexes.OptionsView.ShowFilterPanelMode       = ShowFilterPanelMode.Default;
            gvLignesAnnexes.OptionsFind.AlwaysVisible             = true;
        }
        private void InitGrid()
        {
            // intializer la gride
            foreach (var zone in _controller.GetZoneValues())
            {
                switch (zone.Type)
                {
                case ZoneType.D:
                    var repoDate = new RepositoryItemDateEdit();
                    gvLigneImport.Columns.Add(new GridColumn
                    {
                        Caption    = zone.Code,
                        FieldName  = zone.PropertieFieldName,
                        ColumnEdit = repoDate,
                        Visible    = true
                    });
                    break;

                case ZoneType.N:

                    var repoDecimal = new RepositoryItemTextEdit
                    {
                        Mask =
                        {
                            MaskType         = MaskType.Numeric,
                            EditMask         = "n3",
                            ShowPlaceHolders = false
                        },
                        DisplayFormat =
                        {
                            FormatType   = FormatType.Numeric,
                            FormatString = "n3"
                        },
                        MaxLength = 15
                    };
                    gvLigneImport.Columns.Add(new GridColumn
                    {
                        Caption    = zone.Code,
                        FieldName  = zone.PropertieFieldName,
                        ColumnEdit = repoDecimal,
                        Visible    = true
                    });
                    break;

                case ZoneType.I:
                    var repoInterger = new RepositoryItemTextEdit
                    {
                        Mask =
                        {
                            MaskType         = MaskType.Numeric,
                            EditMask         = "n0",
                            ShowPlaceHolders = false
                        },
                        DisplayFormat =
                        {
                            FormatType   = FormatType.Numeric,
                            FormatString = "n0"
                        },
                        MaxLength = 15
                    };
                    gvLigneImport.Columns.Add(new GridColumn
                    {
                        Caption    = zone.Code,
                        FieldName  = zone.PropertieFieldName,
                        ColumnEdit = repoInterger,
                        Visible    = true
                    });
                    break;

                case ZoneType.E:
                    var repoEnum = new RepositoryItemImageComboBox();
                    repoEnum.Items.AddEnum(zone.EnumType);
                    gvLigneImport.Columns.Add(new GridColumn
                    {
                        Caption    = zone.Code,
                        FieldName  = zone.PropertieFieldName,
                        ColumnEdit = repoEnum,
                        Visible    = true
                    });
                    break;

                case ZoneType.X:
                    var repoString = new RepositoryItemTextEdit();
                    gvLigneImport.Columns.Add(new GridColumn
                    {
                        Caption    = zone.Code,
                        FieldName  = zone.PropertieFieldName,
                        ColumnEdit = repoString,
                        Visible    = true
                    });
                    break;
                }
            }

            gvLigneImport.BestFitColumns();
            gvLigneImport.OptionsSelection.EnableAppearanceFocusedCell = false;
            gvLigneImport.OptionsSelection.EnableAppearanceFocusedRow  = true;
            gvLigneImport.FocusRectStyle = DrawFocusRectStyle.RowFullFocus;
            gvLigneImport.Appearance.FocusedRow.BackColor             = Color.FromArgb(255, 255, 192);
            gvLigneImport.Appearance.SelectedRow.BackColor            = Color.FromArgb(255, 255, 192);
            gvLigneImport.Appearance.OddRow.BackColor                 = Color.FromArgb(231, 244, 247);
            gvLigneImport.OptionsView.EnableAppearanceOddRow          = true;
            gvLigneImport.Appearance.SelectedRow.Options.UseBackColor = true;
            gvLigneImport.OptionsBehavior.Editable           = true;
            gvLigneImport.OptionsDetail.EnableMasterViewMode = false;
            gvLigneImport.OptionsBehavior.Editable           = false;

            gvLigneImport.OptionsCustomization.AllowColumnMoving     = false;
            gvLigneImport.OptionsCustomization.AllowColumnResizing   = false;
            gvLigneImport.OptionsCustomization.AllowFilter           = false;
            gvLigneImport.OptionsCustomization.AllowGroup            = false;
            gvLigneImport.OptionsCustomization.AllowQuickHideColumns = false;
            gvLigneImport.OptionsCustomization.AllowSort             = false;
            gvLigneImport.OptionsMenu.EnableColumnMenu    = false;
            gvLigneImport.OptionsView.ShowFilterPanelMode = ShowFilterPanelMode.Never;
            gvLigneImport.OptionsView.ShowGroupPanel      = false;
            gvLigneImport.OptionsView.ShowIndicator       = false;
        }