BrightIdeasSoftware.ObjectListView.MakeHeaderRightClickMenu C# (CSharp) Method

MakeHeaderRightClickMenu() protected method

Create the menu that should be displayed when the user right clicks on the given column header.
protected MakeHeaderRightClickMenu ( int columnIndex ) : ToolStripDropDown
columnIndex int Index of the column that was right clicked. /// This can be negative, which indicates a click outside of any header.
return ToolStripDropDown
        protected virtual ToolStripDropDown MakeHeaderRightClickMenu(int columnIndex)
        {
            ToolStripDropDown m = new ContextMenuStrip();

            if (columnIndex >= 0 && this.UseFiltering && this.ShowFilterMenuOnRightClick)
                m = this.MakeFilteringMenu(m, columnIndex);

            if (columnIndex >= 0 && this.ShowCommandMenuOnRightClick)
                m = this.MakeColumnCommandMenu(m, columnIndex);

            if (this.SelectColumnsOnRightClickBehaviour != ColumnSelectBehaviour.None) {
                m = this.MakeColumnSelectMenu(m);
            }

            return m;
        }
ObjectListView