예제 #1
0
        private void ddlEntityView_Click(object sender, EventArgs e)
        {
            DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView;
            //DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo hi = view.CalcHitInfo(view.GridControl.PointToClient(Cursor.Position));
            //if (hi.InRowCell) MessageBox.Show(view.GetRowCellValue(view.FocusedRowHandle, "Id").ToString());

            if (view.GetFocusedRow() == null || view.GetFocusedRow().GetType() == typeof(DevExpress.Data.NotLoadedObject))
            {
                return;
            }

            SelectedEntity = view.GetFocusedRow();
        }
예제 #2
0
        private void ddlTopCategoryView_Click(object sender, EventArgs e)
        {
            DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView;
            //DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo hi = view.CalcHitInfo(view.GridControl.PointToClient(Cursor.Position));
            //if (hi.InRowCell) MessageBox.Show(view.GetRowCellValue(view.FocusedRowHandle, "Id").ToString());

            if (view.GetFocusedRow() == null || view.GetFocusedRow().GetType() == typeof(DevExpress.Data.NotLoadedObject))
            {
                return;
            }

            SelectedTopCategory = ((DevExpress.Data.Async.Helpers.ReadonlyThreadSafeProxyForObjectFromAnotherThread)(view.GetFocusedRow())).OriginalRow as DB.CAT_Category;
        }