void TreeList_PopupMenuShowing(object sender, DevExpress.XtraTreeList.PopupMenuShowingEventArgs e) { TreeListHitInfo hitInfo = (sender as TreeList).CalcHitInfo(e.Point); if (hitInfo.HitInfoType == HitInfoType.Column || hitInfo.HitInfoType == HitInfoType.SummaryFooter) { AddMenuItem(e.Menu); } }
private void treeList1_PopupMenuShowing(object sender, DevExpress.XtraTreeList.PopupMenuShowingEventArgs e) { TreeList tL = sender as TreeList; if (tL.Nodes.Count == 0) { return; } TreeListHitInfo hitInfo = tL.CalcHitInfo(e.Point); DXMenuItem menuItem = new DXMenuItem("Открыть", this.OpenComponent); menuItem.Tag = hitInfo.Column; e.Menu.Items.Add(menuItem); }
private void treeList1_PopupMenuShowing(object sender, DevExpress.XtraTreeList.PopupMenuShowingEventArgs e) { TreeList tL = sender as TreeList; TreeListHitInfo hitInfo = tL.CalcHitInfo(e.Point); if (hitInfo.HitInfoType == HitInfoType.SummaryFooter) { DXMenuItem menuItem = new DXMenuItem("Clear All", new EventHandler(this.clearAllMenuItemClick)); menuItem.Tag = hitInfo.Column; e.Menu.Items.Add(menuItem); } if (hitInfo.HitInfoType == HitInfoType.Cell) { DXMenuItem menuItem = new DXMenuItem("Connect", new EventHandler(this.clearAllMenuItemClick)); menuItem.Tag = hitInfo.Column; e.Menu.Items.Add(menuItem); } if (hitInfo.HitInfoType == HitInfoType.Column && hitInfo.Column.Caption == "Department") { e.Allow = false; } }
private void treeList1_PopupMenuShowing(object sender, DevExpress.XtraTreeList.PopupMenuShowingEventArgs e) { }
private void treeList1_PopupMenuShowing(object sender, DevExpress.XtraTreeList.PopupMenuShowingEventArgs e) { Point p2 = Control.MousePosition; AccessPopupMenu.ShowPopup(p2); }
private void SystemManagementAndTools_OrganizationManage_OrganizationList_OrganizationList_TreeList_PopupMenuShowing(object sender, DevExpress.XtraTreeList.PopupMenuShowingEventArgs e) { //barButtonItem_Add.Enabled=true; //barButtonItem_Delete.Enabled=false; //barButtonItem_Detail.Enabled=false; //barButtonItem_Modify.Enabled=false; //for (int i = 0; i < SystemManagementAndTools_OrganizationManage_OrganizationList_OrganizationList_TreeList.Nodes.Count; i++) //{ // // MessageBox.Show(SystemManagementAndTools_OrganizationManage_OrganizationList_OrganizationList_TreeList.Nodes[i].GetValue("name").ToString()); // // MessageBox.Show(SystemManagementAndTools_OrganizationManage_OrganizationList_OrganizationList_TreeList.Nodes.Count.ToString()); // if (SystemManagementAndTools_OrganizationManage_OrganizationList_OrganizationList_TreeList.Nodes[i].CheckState == CheckState.Checked) // { // j++; // if (SystemManagementAndTools_OrganizationManage_OrganizationList_OrganizationList_TreeList.Nodes[i].HasChildren) // { // } // } // } //if (j == 1) //{ // barButtonItem_Add.Enabled = true; // barButtonItem_Delete.Enabled = true; // barButtonItem_Detail.Enabled = true; // barButtonItem_Modify.Enabled = true; //} //if (j > 1) //{ // barButtonItem_Add.Enabled = true; // barButtonItem_Delete.Enabled = true; // barButtonItem_Detail.Enabled = false; // barButtonItem_Modify.Enabled = false; //} }