Shovan Saha

Shovan Saha

  • NA
  • 321
  • 91.1k

datagridview last row problem

Sep 15 2017 1:13 PM
I have a datagridview like this but I do not want the last row(blue color), please help.
 
 I have used:
using (OleDbCommand cmd = new OleDbCommand("SELECT * FROM LalPension", con))
{
cmd.CommandType = CommandType.Text;
using (OleDbDataAdapter da = new OleDbDataAdapter(cmd))
{
using (DataTable dt = new DataTable())
{
da.Fill(dt);
dataGridView1APen.DataSource = dt;
dataGridView1APen.CurrentCell = dataGridView1APen.Rows[dataGridView1APen.Rows.Count - 1].Cells[0];
txtAPenEnterSoinikNo.Focus();
specialFontEnglish();
specialFontBangla();
dgvCellColorYellow();
lblCountAPen();
}
}
}
 

Answers (1)