Skip to content

Commit 8f94ca3

Browse files
committed
focus on last row
1 parent 02d3c08 commit 8f94ca3

5 files changed

Lines changed: 5 additions & 0 deletions

File tree

.vs/LFAR/v16/.suo

-4 KB
Binary file not shown.
0 Bytes
Binary file not shown.

LFAR/Form1.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ private void Form1_Load(object sender, EventArgs e)
100100
}
101101
}
102102
catch (Exception exception) { MessageBox.Show(exception.Message); }
103+
104+
// focus on last row
105+
dataGridView1.CurrentCell = dataGridView1.Rows[dataGridView1.RowCount - 1].Cells[0];
103106
}
104107

105108
private void deleteCollectionButton_Click(object sender, EventArgs e)
@@ -165,6 +168,8 @@ private void button3_Click(object sender, EventArgs e)
165168
private void button7_Click(object sender, EventArgs e)
166169
{
167170
dataGridView1.Rows.Add(false, "......", "......", "......");
171+
172+
// focus on last row
168173
dataGridView1.CurrentCell = dataGridView1.Rows[dataGridView1.RowCount - 1].Cells[0];
169174
}
170175

LFAR/obj/Debug/LFAR.exe

0 Bytes
Binary file not shown.

LFAR/obj/Debug/LFAR.pdb

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)