// 表格配置用.xmlg,搜索窗口配置用.xmls
        void contextMenuStrip2_Opening(object sender, System.ComponentModel.CancelEventArgs e)
        {
            Xceed.Grid.Cell cell = m_contextMenuManagerColumnCell;
            if (cell == null)
            {
                return;
            }
            GridColumnInfo columnInfo = cell.ParentColumn.Tag as GridColumnInfo;

            if (columnInfo.EnableCopy.HasValue)
            {
                tsmCopyColumn.Visible = columnInfo.EnableCopy.Value;
            }

            GridInfo gridInfo = ADInfoBll.Instance.GetGridInfo(m_grid.GridName);

            if (!Authority.AuthorizeByRule(gridInfo.AllowInnerFilter))
            {
                tsmFilter.Visible = false;
            }
            else
            {
                tsmFilter.Checked = m_grid.GetFilterRowVisible();
            }

            tsmGroup.Checked = (m_grid.GetGroupByRow() != null);

            if (m_masterGrid != null &&
                tsmPresetLayout.DropDownItems.Count == 0)
            {
                string[] folders = new string[] { m_masterGrid.GetGridDefaultDataDirectory(), m_masterGrid.GetGridGlobalDataDirectory() };

                foreach (string folder in folders)
                {
                    if (!System.IO.Directory.Exists(folder))
                    {
                        continue;
                    }
                    foreach (string fileName in System.IO.Directory.GetFiles(folder, "*.xmlg"))
                    {
                        ToolStripMenuItem item = new ToolStripMenuItem();
                        item.Text   = System.IO.Path.GetFileName(fileName).Replace(".xmlg", "");
                        item.Tag    = fileName;
                        item.Click += new EventHandler(tsmPresetSubitem_Click);
                        tsmPresetLayout.DropDownItems.Add(item);
                    }
                }

                if (tsmPresetLayout.DropDownItems.Count == 0)
                {
                    tsmPresetLayout.Visible = false;
                }
            }
        }