Example #1
0
        object GetFocusedRowObject(IColumnView view)
        {
            if (view.Window == null)
            {
                return(XtraGridUtils.GetFocusedRowObject(CollectionSource, (DevExpress.XtraGrid.Views.Base.ColumnView)view));
            }
            int rowHandle = view.FocusedRowHandle;

            if (!((!view.IsDataRow(rowHandle) && !view.IsNewItemRow(rowHandle))))
            {
                return(XtraGridUtils.GetFocusedRowObject((DevExpress.XtraGrid.Views.Base.ColumnView)view));
            }
            return(XtraGridUtils.GetFocusedRowObject(CollectionSource, (DevExpress.XtraGrid.Views.Base.ColumnView)view));
        }
Example #2
0
        object GetFocusedRowObject(DevExpress.ExpressApp.Win.Editors.XafGridView view)
        {
            if (view is XpandXafGridView && ((XpandXafGridView)view).Window == null)
            {
                return(XtraGridUtils.GetFocusedRowObject(_collectionSourceBase, view));
            }
            int rowHandle = view.FocusedRowHandle;

            if (!((!view.IsDataRow(rowHandle) && !view.IsNewItemRow(rowHandle))))
            {
                return(view.GetRow(rowHandle));
            }
            return(XtraGridUtils.GetFocusedRowObject(_collectionSourceBase, view));
        }
Example #3
0
        protected override void RaiseShownEditor()
        {
            var gridInplaceEdit = ActiveEditor as IGridInplaceEdit;

            if (gridInplaceEdit != null)
            {
                var focusedRowObject = XtraGridUtils.GetFocusedRowObject(this);
                if (focusedRowObject is IXPSimpleObject)
                {
                    (gridInplaceEdit).GridEditingObject = focusedRowObject;
                }
            }
            base.RaiseShownEditor();
        }
Example #4
0
 private object GetFocusedObject()
 {
     return(XtraGridUtils.GetFocusedRowObject(this));
 }