void MembersArea_PerformControlAction(object sender, ControlActionEventArgs<MemberControl> e)
		{
			ModalDialog dlg;
			MemberInfo info = e.UserData != null ? e.UserData.Member : null;
			switch (e.Action)
			{
				case ControlActionType.ShowMDX:
					ShowDataSourceInfo(GetDataSourceInfo(null));
					break;
				case ControlActionType.ShowProperties:
					dlg = new ModalDialog() { Width = 400, Height = 300, DialogStyle = ModalDialogStyles.OK };
					MemberPropertiesControl properties = new MemberPropertiesControl();
					properties.Initialize(info);
					dlg.Content = properties;
					dlg.Caption = Localization.MemberPropertiesDialog_Caption;
					Panel panel = GetRootPanel(this);
					if (panel != null)
					{
						panel.Children.Add(dlg.Dialog.PopUpControl);
					}
					ShowDialog(dlg);
					break;
				case ControlActionType.ShowAttributes:
					ShowMemberAttributes(info);
					break;
				case ControlActionType.SortingByProperty:
					ShowSortPropertiesDialog(PivotTableSortTypes.SortByProperty, e.UserData);
					break;
				case ControlActionType.SortingAxisByMeasure:
					ShowSortPropertiesDialog(PivotTableSortTypes.SortAxisByMeasure, e.UserData);
					break;
				case ControlActionType.SortingByValue:
					ShowSortPropertiesDialog(PivotTableSortTypes.SortByValue, e.UserData);
					break;
				case ControlActionType.ClearAxisSorting:
					if (m_CellSetProvider != null)
					{
						if (e.UserData is ColumnMemberControl)
						{
							if (PivotGrid.AxisIsRotated == false)
								m_CellSetProvider.ClearSort(0);
							else
								m_CellSetProvider.ClearSort(1);
						}
						if (e.UserData is RowMemberControl)
						{
							if (PivotGrid.AxisIsRotated == false)
								m_CellSetProvider.ClearSort(1);
							else
								m_CellSetProvider.ClearSort(0);
						}
					}
					bool refreshed = false;
					if (DataManager != null)
					{
						if (DataManager.Axis0_MeasuresSort != null || DataManager.Axis1_MeasuresSort != null)
						{
							SetAxisByMeasureSort(e.UserData, null);
							refreshed = true;
							RunServiceCommand(ServiceCommandType.Refresh);
						}
					}

					if (!refreshed)
					{
						try
						{
							IsWaiting = true;
							PivotGrid.Initialize(m_CellSetProvider);
						}
						finally
						{
							IsWaiting = false;
						}
					}
					break;
				case ControlActionType.DataReorganizationType_None:
					ChangeDataReorganizationType(DataReorganizationTypes.None);
					break;
				case ControlActionType.DataReorganizationType_HitchToParent:
					ChangeDataReorganizationType(DataReorganizationTypes.LinkToParent);
					break;
				case ControlActionType.DataReorganizationType_MergeNeighbors:
					ChangeDataReorganizationType(DataReorganizationTypes.MergeNeighbors);
					break;
			}
		}
        void CellsControl_PerformControlAction(object sender, ControlActionEventArgs<CellInfo> e)
        {
            switch (e.Action)
            {
                case ControlActionType.ShowMDX:
                    UpdateEntry entry = new UpdateEntry(e.UserData);
                    try
                    {
                        entry.OldValue = e.UserData.CellDescr.Value.Value.ToString();
                    }
                    catch { }

                    UpdateEntry change = PivotGrid.LocalChanges.FindChange(e.UserData);
                    if (change != null)
                    {
                        entry.NewValue = change.NewValue;
                    }

                    GetDataSourceInfo(entry);
                    break;
                case ControlActionType.ShowProperties:
                    ModalDialog dlg = new ModalDialog() {Width = 400, Height = 300, DialogStyle = ModalDialogStyles.OK };
                    CellPropertiesControl properties = new CellPropertiesControl();
                    properties.Initialize(e.UserData);
                    dlg.Content = properties;
                    dlg.Caption = Localization.CellPropertiesDialog_Caption;
                    Panel panel = GetRootPanel(this);
                    if (panel != null)
                    {
                        panel.Children.Add(dlg.Dialog.PopUpControl);
                    }
                    // На время убираем контекстное меню сводной таблицы
                    dlg.DialogClosed += new EventHandler<DialogResultArgs>(Dlg_DialogClosed);
                    PivotGrid.UseContextMenu = false;
                    dlg.Show();
                    break;
                case ControlActionType.ValueDelivery:
                    ShowValueDeliveryDialog(e.UserData);
                    break;
                case ControlActionType.ValueCopy:
                    ShowValueCopyDialog(e.UserData);
                    break;
                case ControlActionType.Copy:
                    CopyCellsToClipboard(e.UserData);
                    break;
                case ControlActionType.Paste:
                    PasteCellsFromClipboard(e.UserData);
                    break;
                case ControlActionType.DrillThrough:
                    DrillThroughCell(e.UserData);
                    break;
            }
        }
		void CellsControl_PerformControlAction(object sender, ControlActionEventArgs<CellInfo> e)
		{
			switch (e.Action)
			{
				case ControlActionType.ShowMDX:
					UpdateEntry entry = new UpdateEntry(e.UserData);
					try
					{
						if (e.UserData != null)
							entry.OldValue = e.UserData.CellDescr.Value.Value.ToString();
					}
					catch { }

					UpdateEntry change = PivotGrid.LocalChanges.FindChange(e.UserData);
					if (change != null)
					{
						entry.NewValue = change.NewValue;
					}

					ShowDataSourceInfo(GetDataSourceInfo(entry));
					break;
				case ControlActionType.ShowProperties:
					ModalDialog dlg = new ModalDialog() { Width = 400, Height = 300, DialogStyle = ModalDialogStyles.OK };
					CellPropertiesControl properties = new CellPropertiesControl();
					properties.Initialize(e.UserData);
					dlg.Content = properties;
					dlg.Caption = Localization.CellPropertiesDialog_Caption;
					Panel panel = GetRootPanel(this);
					if (panel != null)
					{
						panel.Children.Add(dlg.Dialog.PopUpControl);
					}
					ShowDialog(dlg);
					break;
				case ControlActionType.ValueDelivery:
					ShowValueDeliveryDialog(e.UserData);
					break;
				case ControlActionType.ValueCopy:
					ShowValueCopyDialog(e.UserData);
					break;
				case ControlActionType.Copy:
					CopyCellsToClipboard(e.UserData);
					break;
				case ControlActionType.Paste:
					PasteCellsFromClipboard(e.UserData);
					break;
				case ControlActionType.DrillThrough:
					DrillThroughCell(e.UserData);
					break;
				case ControlActionType.DataReorganizationType_None:
					ChangeDataReorganizationType(DataReorganizationTypes.None);
					break;
				case ControlActionType.DataReorganizationType_HitchToParent:
					ChangeDataReorganizationType(DataReorganizationTypes.LinkToParent);
					break;
				case ControlActionType.DataReorganizationType_MergeNeighbors:
					ChangeDataReorganizationType(DataReorganizationTypes.MergeNeighbors);
					break;
			}
		}
 void MembersArea_PerformControlAction(object sender, ControlActionEventArgs<MemberInfo> e)
 {
     switch (e.Action)
     {
         case ControlActionType.ShowMDX:
             GetDataSourceInfo(null);
             break;
         case ControlActionType.ShowProperties:
             ModalDialog dlg = new ModalDialog() { Width = 400, Height = 300, DialogStyle = ModalDialogStyles.OK };
             MemberPropertiesControl properties = new MemberPropertiesControl();
             properties.Initialize(e.UserData);
             dlg.Content = properties;
             dlg.Caption = Localization.MemberPropertiesDialog_Caption;
             Panel panel = GetRootPanel(this);
             if (panel != null)
             {
                 panel.Children.Add(dlg.Dialog.PopUpControl);
             }
             // На время убираем контекстное меню сводной таблицы
             dlg.DialogClosed += new EventHandler<DialogResultArgs>(Dlg_DialogClosed);
             PivotGrid.UseContextMenu = false;
             dlg.Show();
             break;
         case ControlActionType.ShowAttributes:
             ShowMemberAttributes(e.UserData);
             break;
     }
 }