Skip to content

Commit 4ff700e

Browse files
committed
Column context menu was not working
1 parent b800041 commit 4ff700e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/LogExpert/Controls/LogWindow/LogWindowEventHandlers.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -867,11 +867,15 @@ private void columnButton_Click(object sender, EventArgs e)
867867
private void dataGridView_CellContextMenuStripNeeded(object sender,
868868
DataGridViewCellContextMenuStripNeededEventArgs e)
869869
{
870-
if (e.RowIndex > 0 && e.RowIndex < dataGridView.RowCount
870+
if (e.RowIndex >= 0 && e.RowIndex < dataGridView.RowCount
871871
&& !dataGridView.Rows[e.RowIndex].Selected)
872872
{
873873
SelectLine(e.RowIndex, false, true);
874874
}
875+
else if (e.RowIndex < 0)
876+
{
877+
e.ContextMenuStrip = columnContextMenuStrip;
878+
}
875879

876880
if (e.ContextMenuStrip == columnContextMenuStrip)
877881
{

0 commit comments

Comments
 (0)