Exemplo n.º 1
0
        //创建BandColumn
        private void createBandColumn(DevExpress.XtraGrid.Views.BandedGrid.BandedGridView bandGridView, DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand, Dictionary <string, MB.WinBase.Common.ColumnPropertyInfo> colPropertys, Dictionary <string, MB.WinBase.Common.ColumnEditCfgInfo> editCols, MB.WinBase.Common.GridViewLayoutInfo gridViewLayoutInfo, MB.WinBase.Common.GridColumnLayoutInfo columnLayoutInfo, DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn bColumn)
        {
            MB.WinBase.Common.ColumnPropertyInfo fInfo = colPropertys[columnLayoutInfo.ColumnXmlCfgName];
            //判断该列是否可以进行编辑
            DevExpress.XtraEditors.Repository.RepositoryItem rEdit = null;
            if (editCols != null && editCols.ContainsKey(columnLayoutInfo.ColumnXmlCfgName))
            {
                rEdit = CreateEditItemByEditInfo(editCols[columnLayoutInfo.ColumnXmlCfgName], fInfo.CanEdit, fInfo.DataType);//根据用户XML配置的信息获取一个编辑的列。
            }
            else
            {
                rEdit = CreateEditItemByCol(fInfo, false);
            }

            rEdit.Name         = fInfo.Name;
            bColumn.ColumnEdit = rEdit;
            bColumn.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;

            //  bColumn.DisplayFormat = new DevExpress.Utils.FormatInfo

            bandGridView.GridControl.RepositoryItems.Add(rEdit);

            //这句代码必须添加上,否则顺序的调整将会出现问题。
            bandGridView.Columns.Add(bColumn);
            if (gridBand != null)
            {
                gridBand.Columns.Add(bColumn);
            }

            SetEditColumn(bColumn, fInfo, columnLayoutInfo, gridViewLayoutInfo);
        }
Exemplo n.º 2
0
 public FilterColumnCollectionBuilder <TEntity> AddColumn <T>(Expression <Func <TEntity, T> > expression,
                                                              DevExpress.XtraEditors.Repository.RepositoryItem repositoryItem = null,
                                                              FilterColumnClauseClass clauseClass = FilterColumnClauseClass.String, string caption = null)
 {
     if (repositoryItem == null)
     {
         if (typeof(T) == typeof(bool) || (typeof(T) == typeof(bool?)))
         {
             repositoryItem = EditorHelpers.CreatEdit <RepositoryItemCheckEdit>();
             clauseClass    = FilterColumnClauseClass.Generic;
         }
         if ((typeof(T) == typeof(double)) || (typeof(T) == typeof(double?)) || (typeof(T) == typeof(decimal)) || (typeof(T) == typeof(decimal?)))
         {
             repositoryItem = EditorHelpers.CreatEdit <RepositoryItemSpinEdit>();
             clauseClass    = FilterColumnClauseClass.Generic;
         }
         if (typeof(T) == typeof(int) || (typeof(T) == typeof(int?)))
         {
             var spinEdit = EditorHelpers.CreatEdit <RepositoryItemSpinEdit>();
             spinEdit.IsFloatValue = false;
             repositoryItem        = spinEdit;
             clauseClass           = FilterColumnClauseClass.Generic;
         }
     }
     filterColumns.Add(CreateColumn(expression, caption, null, repositoryItem, clauseClass));
     return(this);
 }
Exemplo n.º 3
0
 protected override void SetupRepositoryItem(DevExpress.XtraEditors.Repository.RepositoryItem item)
 {
     base.SetupRepositoryItem(item);
     foreach (CultureInfo culture in CultureInfo.GetCultures(CultureTypes.InstalledWin32Cultures))
     {
         ((RepositoryItemComboBox)item).Items.Add(culture.EnglishName + "(" + culture.Name + ")");
     }
     ((RepositoryItemComboBox)item).TextEditStyle = TextEditStyles.DisableTextEditor;
 }
Exemplo n.º 4
0
        //卡片编辑
        private bool editCardGrid(MB.XWinLib.XtraGrid.GridControlEx xtraGCtl,
                                  object dataSource, MB.WinBase.IFace.IClientRule buiObj, Dictionary <string, MB.WinBase.Common.ColumnEditCfgInfo> editCols)
        {
            MB.WinBase.Atts.RuleClientLayoutAttribute layoutAtt = MB.WinBase.Atts.AttributeConfigHelper.Instance.GetClientRuleSettingAtt(buiObj);
            Dictionary <string, MB.WinBase.Common.ColumnPropertyInfo> colPropertys = MB.WinBase.LayoutXmlConfigHelper.Instance.GetColumnPropertys(layoutAtt.UIXmlConfigFile);

            MB.XWinLib.XtraGrid.XtraGridViewHelper.Instance.SetEditGridAutoInfo(xtraGCtl);

            DevExpress.XtraGrid.Views.Card.CardView cardView = xtraGCtl.MainView as DevExpress.XtraGrid.Views.Card.CardView;

            if (colPropertys == null || colPropertys.Count == 0)
            {
                throw new MB.Util.APPException(string.Format("业务对象 {0} 没有配置对应的XML文件Columns 信息。", layoutAtt.UIXmlConfigFile));
            }
            //	设置控件的显示样式
            XtraGridViewHelper.Instance.SetCardView(xtraGCtl);

            if (cardView.Columns.Count > 0)
            {
                cardView.Columns.Clear();
            }
            //根据业务处理对象得到对应的 UI 编辑设置信息。
            int i = 0;

            foreach (MB.WinBase.Common.ColumnPropertyInfo fInfo in colPropertys.Values)
            {
                DevExpress.XtraGrid.Columns.GridColumn bdc = new DevExpress.XtraGrid.Columns.GridColumn();
                //判断该列是否可以进行编辑
                DevExpress.XtraEditors.Repository.RepositoryItem rEdit = null;
                if (editCols != null && editCols.ContainsKey(fInfo.Name))
                {
                    rEdit = CreateEditItemByEditInfo(editCols[fInfo.Name], fInfo.CanEdit, fInfo.DataType);//根据用户XML配置的信息获取一个编辑的列。
                }
                else
                {
                    rEdit = CreateEditItemByCol(fInfo, true);
                }

                bdc.ColumnEdit = rEdit;
                xtraGCtl.RepositoryItems.Add(rEdit);

                SetEditColumn(bdc, fInfo, null);

                cardView.Columns.Add(bdc);
                i++;
            }
            xtraGCtl.DataSource = dataSource;
            return(true);
        }
Exemplo n.º 5
0
        UnboundFilterColumn CreateColumn <T>(Expression <Func <TEntity, T> > expression, string caption, string fieldName,
                                             DevExpress.XtraEditors.Repository.RepositoryItem repositoryItem, FilterColumnClauseClass clauseClass)
        {
            var member = (expression.Body as MemberExpression).Member;

            if (string.IsNullOrEmpty(fieldName))
            {
                fieldName = GetFieldName <T>(expression);
            }
            if (string.IsNullOrEmpty(caption))
            {
                caption = GetDisplayName(member);
            }
            return(CreateColumn <T>(caption, fieldName, repositoryItem, clauseClass));
        }
Exemplo n.º 6
0
 protected override void SetupRepositoryItem(DevExpress.XtraEditors.Repository.RepositoryItem item)
 {
     base.SetupRepositoryItem(item);
     foreach (IModelAction action in application.Model.ActionDesign.Actions)
     {
         if (action != null)
         {
             IModelActionExtender modelAction = action as IModelActionExtender;
             if (modelAction != null && modelAction.CutomAction)
             {
                 ((RepositoryItemComboBox)item).Items.Add(action.Id);
             }
         }
     }
 }
Exemplo n.º 7
0
        private RepositoryItem[] GetRepositoryEditor(AXFieldMapping fieldMapping)
        {
            RepositoryItem[] items      = new DevExpress.XtraEditors.Repository.RepositoryItem[1];
            EditorType       editorType = (EditorType)Enum.Parse(typeof(EditorType), fieldMapping.EditorType, true);

            if (fieldMapping != null)
            {
                switch (editorType)
                {
                case EditorType.TXT:
                {
                    RepositoryItemTextEdit repositoryItemEditor = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
                    ((System.ComponentModel.ISupportInitialize)(repositoryItemEditor)).BeginInit();
                    repositoryItemEditor.AutoHeight = false;
                    repositoryItemEditor.Name       = "repositoryItemTextEdit" + fieldMapping.FieldName;
                    items[0] = repositoryItemEditor;
                    break;
                }

                case EditorType.CMBO:
                {
                    RepositoryItemComboBox repositoryItemEditor = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
                    ((System.ComponentModel.ISupportInitialize)(repositoryItemEditor)).BeginInit();

                    repositoryItemEditor.AutoHeight = false;
                    repositoryItemEditor.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
                            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)
                        });
                    repositoryItemEditor.Name = "repositoryItemTextEdit" + fieldMapping.FieldName;
                    string[] values = fieldMapping.DefaultValue.Split(',');
                    repositoryItemEditor.Items.AddRange(values);
                    items[0] = repositoryItemEditor;
                    break;
                }
                }
            }
            return(items);
        }
Exemplo n.º 8
0
 UnboundFilterColumn CreateColumn <T>(string caption, string fieldName,
                                      DevExpress.XtraEditors.Repository.RepositoryItem repositoryItem, FilterColumnClauseClass clauseClass)
 {
     return(new UnboundFilterColumn(caption, fieldName, typeof(T), repositoryItem, clauseClass));
 }
Exemplo n.º 9
0
 public FilterColumnCollectionBuilder <TEntity> AddColumn <T>(Expression <Func <TEntity, T> > expression,
                                                              DevExpress.XtraEditors.Repository.RepositoryItem repositoryItem = null, FilterColumnClauseClass clauseClass = FilterColumnClauseClass.String)
 {
     filterColumns.Add(CreateColumn(expression, null, null, repositoryItem, clauseClass));
     return(this);
 }
Exemplo n.º 10
0
 public override void ActivateEditor(DevExpress.XtraEditors.Repository.RepositoryItem ritem, DevExpress.XtraEditors.Container.UpdateEditorInfoArgs args)
 {
     args = new DevExpress.XtraEditors.Container.UpdateEditorInfoArgs(args.MakeReadOnly, args.Bounds, args.Appearance, Owner.FocusedNode.Tag, args.LookAndFeel, args.ErrorText);
     base.ActivateEditor(ritem, args);
 }
Exemplo n.º 11
0
        private RepositoryItem[] GetRepositoryEditor(AXFieldMapping fieldMapping)
        {
            RepositoryItem[] items = new DevExpress.XtraEditors.Repository.RepositoryItem[1];
            EditorType editorType = (EditorType)Enum.Parse(typeof(EditorType), fieldMapping.EditorType, true);

            if (fieldMapping != null)
            {
                switch (editorType)
                {
                    case EditorType.TXT:
                        {
                            RepositoryItemTextEdit repositoryItemEditor = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
                            ((System.ComponentModel.ISupportInitialize)(repositoryItemEditor)).BeginInit();
                            repositoryItemEditor.AutoHeight = false;
                            repositoryItemEditor.Name = "repositoryItemTextEdit" + fieldMapping.FieldName;
                            items[0] = repositoryItemEditor;
                            break;
                        }
                    case EditorType.CMBO:
                        {
                            RepositoryItemComboBox repositoryItemEditor = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
                            ((System.ComponentModel.ISupportInitialize)(repositoryItemEditor)).BeginInit();

                            repositoryItemEditor.AutoHeight = false;
                            repositoryItemEditor.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
                            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
                            repositoryItemEditor.Name = "repositoryItemTextEdit" + fieldMapping.FieldName;
                            string[] values = fieldMapping.DefaultValue.Split(',');
                            repositoryItemEditor.Items.AddRange(values);
                            items[0] = repositoryItemEditor;
                            break;
                        }
                }
            }
            return items;
        }
 public ZoomPictureEditViewInfo(DevExpress.XtraEditors.Repository.RepositoryItem item)
     : base(item)
 {
 }
Exemplo n.º 13
0
        /// <summary>
        /// 通过设置的Edit 列信息得到一个编辑列的控件。
        /// </summary>
        /// <param name="editInfo"></param>
        /// <param name="allowEdit"></param>
        /// <returns></returns>
        public DevExpress.XtraEditors.Repository.RepositoryItem CreateEditItemByEditInfo(MB.WinBase.Common.ColumnEditCfgInfo editInfo, bool allowEdit, string colDataType)
        {
            DevExpress.XtraEditors.Repository.RepositoryItem item = null;
            MB.WinBase.Common.EditControlType controlType         = (MB.WinBase.Common.EditControlType)Enum.Parse(typeof(MB.WinBase.Common.EditControlType), editInfo.EditControlType);

            switch (controlType)
            {
            case MB.WinBase.Common.EditControlType.Combox_DropDownList:
            case MB.WinBase.Common.EditControlType.Combox_DropDown:
                DevExpress.XtraEditors.Repository.RepositoryItemComboBox cobItem = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
                //cobItem.Buttons.Add(new DevExpress.XtraEditors.Controls.EditorButton());
                cobItem.AutoComplete = true;
                setRComboxItems(cobItem, editInfo);
                item = cobItem;
                break;

            case MB.WinBase.Common.EditControlType.ComboCheckedListBox:    //如果设置为
            case MB.WinBase.Common.EditControlType.LookUpEdit:
                DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit lookUp = new DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit();

                XtraRepositoryItemLookUpEditHelper.Instance.CreateLookUpEditItems(lookUp, editInfo, colDataType);
                //暂时把所有的LookUp 的格式 转换为PopupCOntainer 的格式,正确的处理方法应该是区别对待。
                // DevExpress.XtraEditors.Repository.RepositoryItemPopupContainerEdit lookUp = new XtraRepositoryItemPopupContainerEdit(editInfo, allowEdit);
                // lookUp.Name = editInfo.Name;
                item = lookUp;
                break;

            case MB.WinBase.Common.EditControlType.ImageIcoEdit:
                var imageEdit = new DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit();
                item = imageEdit;
                break;

            case MB.WinBase.Common.EditControlType.ColorEdit:
                var colorEdit = new DevExpress.XtraEditors.Repository.RepositoryItemColorEdit();
                colorEdit.ColorText           = DevExpress.XtraEditors.Controls.ColorText.Integer;
                colorEdit.StoreColorAsInteger = true;
                item = colorEdit;
                break;

            //
            //case "ImageCombox": //可以当做存储键/值列并且是只能选择的Combox 控件来使用。
            //    DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox imgCob = new DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox();
            //    imgCob.AllowFocused = false;
            //    imgCob.AutoHeight = false;
            //    setImageCobItems(imgCob, editInfo);
            //    item = imgCob;
            //    break;
            //case "PopupContainer":
            //    DevExpress.XtraEditors.Repository.RepositoryItemPopupContainerEdit popuCon = new XtraRepositoryItemPopupContainerEdit(editInfo, allowEdit);
            //    item = popuCon;
            //    break;
            //case "Ellipsis":
            //    //DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit butEdit = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit();
            //    //butEdit.ButtonClick +=new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(butEdit_ButtonClick);
            //    //butEdit.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            //    //																		   new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis)});
            //    //					RepositoryItemMyButtonEdit butEdit = new RepositoryItemMyButtonEdit();
            //    //
            //    //					item = butEdit;
            //    break;
            case MB.WinBase.Common.EditControlType.ClickButtonInput:
                XtraRepositoryItemClickButtonEdit butEdit = new XtraRepositoryItemClickButtonEdit(editInfo);
                // (butEdit.Buttons[0] as MyButtonEdit).ColumnEditCfgInfo = editInfo;
                item = butEdit;

                break;

            case MB.WinBase.Common.EditControlType.PopupRegionEdit:
                XtraRepositoryItemRegionEdit regionEdit = new XtraRepositoryItemRegionEdit(editInfo);
                item = regionEdit;
                break;

            default:
                throw new MB.Util.APPException("该EditCols 类型" + editInfo.EditControlType + "还没有进行处理。请确定配置的信息是否正确?");
                //break;
            }
            return(item);
        }
Exemplo n.º 14
0
        /// <summary>
        /// 根据字段的类型名称获取一个XtrGrid 的编辑控件。
        /// </summary>
        /// <param name="fullTypeName"></param>
        /// <param name="isCard"> 如果是卡片编辑的话图片的显示使用PictureEdit的方式。</param>
        /// <returns></returns>
        public DevExpress.XtraEditors.Repository.RepositoryItem createEditItemByCol(string fullTypeName, bool isCard, MB.WinBase.Common.ColumnPropertyInfo propertyInfo)
        {
            DevExpress.XtraEditors.Repository.RepositoryItem item = null;
            switch (fullTypeName)
            {
            case "System.Int16":
                DevExpress.XtraEditors.Repository.RepositoryItemSpinEdit int16Item = new DevExpress.XtraEditors.Repository.RepositoryItemSpinEdit();
                int16Item.IsFloatValue  = false;
                int16Item.EditMask      = "N00";
                int16Item.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
                item = int16Item;
                if (propertyInfo != null)
                {
                    if (propertyInfo.MinValue > Int32.MinValue)
                    {
                        int16Item.MinValue = System.Convert.ToInt16(propertyInfo.MinValue);
                    }
                    if (propertyInfo.MaxValue < Int32.MaxValue)
                    {
                        int16Item.MaxValue = System.Convert.ToInt16(propertyInfo.MaxValue);
                    }
                }
                break;

            case "System.Int32":
                item = CreateEditItemInt32(propertyInfo);
                break;

            case "System.Decimal":
                DevExpress.XtraEditors.Repository.RepositoryItemCalcEdit deciItem = new XtraRepositoryItemCalcEditEx();
                deciItem.MaxLength = 12;    //初不设置的一个数,需要修改;
                item = deciItem;
                break;

            case "System.DateTime":
                DevExpress.XtraEditors.Repository.RepositoryItemDateEdit dateItem = new DevExpress.XtraEditors.Repository.RepositoryItemDateEdit();
                dateItem.NullDate   = DateTime.MinValue;
                dateItem.NullText   = string.Empty;
                dateItem.AutoHeight = false;
                item = dateItem;
                break;

            case "System.Boolean":     //目前Boolean 先用CheckedBox 来表达,如果需要再修改为Group Radio
                DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit boolItem = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
                item = boolItem;
                break;

            case "System.Byte[]":
                if (!isCard)
                {
                    DevExpress.XtraEditors.Repository.RepositoryItemImageEdit imageItem = new DevExpress.XtraEditors.Repository.RepositoryItemImageEdit();
                    //imageItem.NullText = "";
                    item = imageItem;
                }
                else
                {
                    DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit picItem = new DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit();
                    item = picItem;
                }
                break;

            default:
                DevExpress.XtraEditors.Repository.RepositoryItemTextEdit txtItem = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
                item = txtItem;
                break;
            }
            return(item);//new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
        }
Exemplo n.º 15
0
        //编辑一般ViewGrid 格式
        private bool editViewGrid(GridDataBindingParam bindParam,
                                  Dictionary <string, MB.WinBase.Common.ColumnPropertyInfo> objPropertys,
                                  Dictionary <string, MB.WinBase.Common.ColumnEditCfgInfo> editCols,
                                  MB.WinBase.Common.GridViewLayoutInfo gridViewLayoutInfo)
        {
            if (gridViewLayoutInfo != null)
            {
                MB.Util.TraceEx.Write("OK");
            }

            DevExpress.XtraGrid.GridControl xtraGCtl = bindParam.XtraGrid;

            MB.XWinLib.XtraGrid.XtraGridViewHelper.Instance.SetEditGridAutoInfo(xtraGCtl);

            XtraGridViewHelper.Instance.SetXtraGridSkin(xtraGCtl, XtraGridSkin.Edit);



            DevExpress.XtraGrid.Views.Grid.GridView gridView = xtraGCtl.MainView as DevExpress.XtraGrid.Views.Grid.GridView;
            if (gridView == null)
            {
                throw new MB.Util.APPException("目前编辑的XtrGrid 只支持DevExpress.XtraGrid.Views.Grid.GridView的格式。请检查你设置的XtrGrid View是否为这种类型。");
            }
            if (objPropertys == null || objPropertys.Count == 0)
            {
                throw new MB.Util.APPException("业务对象没有配置对应的XML文件Columns 信息。");
            }
            //	设置控件的显示样式
            XtraGridViewHelper.Instance.SetGridView(gridView, objPropertys);

            if (gridView.Columns.Count > 0)
            {
                gridView.Columns.Clear();
                xtraGCtl.RepositoryItems.Clear();
            }

            //根据业务处理对象得到对应的 UI 编辑设置信息。
            int i = 0;

            foreach (MB.WinBase.Common.ColumnPropertyInfo fInfo in objPropertys.Values)
            {
                if (!fInfo.Visibled)
                {
                    continue;
                }
                DevExpress.XtraGrid.Columns.GridColumn bdc = new DevExpress.XtraGrid.Columns.GridColumn();
                //判断该列是否可以进行编辑
                DevExpress.XtraEditors.Repository.RepositoryItem rEdit = null;
                if (editCols != null && editCols.ContainsKey(fInfo.Name))
                {
                    rEdit = CreateEditItemByEditInfo(editCols[fInfo.Name], fInfo.CanEdit, fInfo.DataType);//根据用户XML配置的信息获取一个编辑的列。
                }
                else
                {
                    rEdit = CreateEditItemByCol(fInfo, false);
                }

                rEdit.Name = fInfo.Name;

                bdc.ColumnEdit = rEdit;
                xtraGCtl.RepositoryItems.Add(rEdit);

                gridView.Columns.Add(bdc);

                GridColumnLayoutInfo layoutInfo = null;
                if (gridViewLayoutInfo != null && gridViewLayoutInfo.GridLayoutColumns.Count > 0)
                {
                    layoutInfo = gridViewLayoutInfo.GridLayoutColumns.FirstOrDefault <MB.WinBase.Common.GridColumnLayoutInfo>(o => o.Name == fInfo.Name);
                }

                SetEditColumn(bdc, fInfo, layoutInfo, gridViewLayoutInfo);

                i++;
            }
            //不管什么时候都恢复保存的状态
            XtraGridViewHelper.Instance.RestoreXtraGridState(bindParam.XtraGrid);
            if (objPropertys != null)
            {
                XtraGridViewHelper.Instance.SetGroupSummary(gridView, objPropertys);
            }

            xtraGCtl.DataSource = MB.Util.MyConvert.Instance.ToGridViewSource(bindParam.DataSource);

            setAllowFocusColumn(gridView);

            XtraContextMenuType viewPopuMenus = XtraContextMenuType.SaveGridState | XtraContextMenuType.Export
                                                | XtraContextMenuType.Delete
                                                | XtraContextMenuType.DataImport
                                                | XtraContextMenuType.ColumnsAllowSort
                                                | XtraContextMenuType.BatchAdd
                                                | XtraContextMenuType.QuickInput
                                                | XtraContextMenuType.ExcelEdit;

            //bool autoNewItem = gridViewLayoutInfo == null || !gridViewLayoutInfo.ReadOnly;
            XtraGridViewHelper.Instance.SetGridViewNewItem(xtraGCtl, true, viewPopuMenus);
            return(true);
        }