private void HandleSectionClick(object sender, HeaderSectionEventArgs ea) { if (ea.Item == _arrangeByHeaderSection) { ShowSortContextMenu(); } else if (ea.Item == _sortOrderHeaderSection) { OnColumnClick(_sortColumn); } }
private void HandleSectionClick(object sender, HeaderSectionEventArgs ea) { JetListViewColumn col = ColumnFromHeaderSection(ea.Item); if (!_processingHeaderOperation) { if (ea.Button == MouseButtons.Left) { _processingHeaderOperation = true; OnColumnClick(col); _processingHeaderOperation = false; } } }
private void HandleDividerDblClick(object sender, HeaderSectionEventArgs ea) { JetListViewColumn col = ColumnFromHeaderSection(ea.Item); if (col.FixedSize) { return; } Cursor.Current = Cursors.WaitCursor; try { int fixedWidth = 0; JetListViewColumn indentCol = null; for (int i = 0; i < _columnCollection.Count; i++) { JetListViewColumn aCol = _columnCollection [i]; if (aCol.IsIndentColumn()) { indentCol = aCol; } if (aCol.FixedSize && indentCol != null) { fixedWidth += col.Width; } if (aCol == col) { RecalcAll(aCol, indentCol, fixedWidth, null); OnInvalidate(); break; } if (!aCol.FixedSize && !aCol.IsIndentColumn()) { indentCol = null; fixedWidth = 0; } } } finally { Cursor.Current = Cursors.Default; } }