Hello ALL,
When I click on button display it populates the datagrid with my data. No problem there.
private void btnDisplay_Click_1(object sender, EventArgs e)
{
da.SelectCommand = new SqlCommand("SELECT FirstNum, SecondNum, ThirdNum, FourthNum, FifthNum, Date FROM tblNUMBERS_1", cs);
ds.Clear();
da.Fill(ds);
DataView dv = new DataView(ds.Tables[0], "Date = Date", "Date Desc", DataViewRowState.CurrentRows);
dg.DataSource = dv;
tblNUMBERSBS_1.DataSource = dv;
dg.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
}
I'm able to navigate through the records in the table.
private void btnNext_Click(object sender, EventArgs e)
{
tblNUMBERSBS_1.MoveNext();
}
When I click on row lets say '#8' it does select the entire row as I want. When I click button 'Move Next' it does move it to record/row #2 instead of row #9.
What is the best approach to achieve that? to move it to row #9?
tblNUMBERSBS_1 is a binding source, yes..
BindingSource tblNUMBERSBS_1 = new BindingSource();