예제 #1
0
 protected virtual void OnCustomizeAppearance(string name, IAppearanceBase item, int rowHandle) {
     if (CustomizeAppearance != null) {
         CustomizeAppearanceEventArgs args = null;
         if (!IsAsyncServerMode()) {
             args = new CustomizeAppearanceEventArgs(name, item, DevExpress.ExpressApp.Win.Core.XtraGridUtils.GetRow((DevExpress.XtraGrid.Views.Base.ColumnView)gridView, rowHandle));
         } else {
             if (!gridView.IsRowLoaded(rowHandle)) {
                 return;
             }
             args = new CustomizeAppearanceEventArgs(args.Name, args.Item,
                 rowHandle, new AsyncServerModeContextDescriptor((DevExpress.XtraGrid.Views.Base.ColumnView)gridView, CollectionSource.ObjectSpace, CollectionSource.ObjectTypeInfo.Type));
         }
         CustomizeAppearance(this, args);
     }
 }
예제 #2
0
		protected virtual void OnCustomizeEnabled(string name, IAppearanceBase item, int rowHandle) {
			if(CustomizeEnabled != null && CollectionSource != null && !IsAsyncServerMode()) {
				if(gridView.FocusedRowHandle != GridControl.AutoFilterRowHandle && gridView.FocusedColumn.UnboundType == UnboundColumnType.Bound) {
					object rowObj = DevExpress.ExpressApp.Win.Core.XtraGridUtils.GetRow(CollectionSource, (DevExpress.XtraGrid.Views.Base.ColumnView) gridView, gridView.FocusedRowHandle);
					if(rowObj != null) {
						CustomizeEnabledEventArgs args = new CustomizeEnabledEventArgs(name, item, rowObj, CollectionSource, CollectionSource.ObjectSpace);
						CustomizeEnabled(this, args);
					}
				}
			}
		}