Compare commits

..

No commits in common. 'ea4d400eabc974972fefc2d0f28a4f620c148590' and '3432ece505b78b31a7475e77ba40a1c2fa49728c' have entirely different histories.

@ -74,19 +74,11 @@ namespace RfidWeb.Frm
}
this.Invoke(() =>
{
try
int currentFirstVisibleRowIndex = dataGridView1.FirstDisplayedScrollingRowIndex;
this.dataGridView1.DataSource = lsList;
if (currentFirstVisibleRowIndex > 0)
{
int currentFirstVisibleRowIndex = dataGridView1.FirstDisplayedScrollingRowIndex;
this.dataGridView1.DataSource = lsList;
if (currentFirstVisibleRowIndex >= 0 && currentFirstVisibleRowIndex < dataGridView1.Rows.Count)
{
dataGridView1.FirstDisplayedScrollingRowIndex = currentFirstVisibleRowIndex;
}
}
catch (Exception e)
{
Console.WriteLine(e);
dataGridView1.FirstDisplayedScrollingRowIndex = currentFirstVisibleRowIndex;
}
});
}
@ -107,18 +99,11 @@ namespace RfidWeb.Frm
}
this.Invoke(() =>
{
try
{
int currentFirstVisibleRowIndex = dataGridView2.FirstDisplayedScrollingRowIndex;
this.dataGridView2.DataSource = lsList;
if (currentFirstVisibleRowIndex >= 0 && currentFirstVisibleRowIndex < dataGridView2.Rows.Count)
{
dataGridView2.FirstDisplayedScrollingRowIndex = currentFirstVisibleRowIndex;
}
}
catch (Exception e)
int currentFirstVisibleRowIndex = dataGridView2.FirstDisplayedScrollingRowIndex;
this.dataGridView2.DataSource = lsList;
if (currentFirstVisibleRowIndex > 0)
{
Console.WriteLine(e.Message);
dataGridView2.FirstDisplayedScrollingRowIndex = currentFirstVisibleRowIndex;
}
});
}

Loading…
Cancel
Save