-1
I have a DataGridView
and a method to fill it:
public DataTable BuscarClientesEmAtividade()
{
OleDbDataAdapter da;
DataTable dt = new DataTable();
OleDbConnection con = ConexaoBanco();
OleDbCommand cmd = con.CreateCommand();
cmd.CommandText = "SELECT codcli, nomecli FROM TBCLI WHERE ematividadecli = true";
da = new OleDbDataAdapter(cmd.CommandText, con);
da.Fill(dt);
con.Close();
return dt;
}
My doubt is how to get it inserted in the first column of DataTable dt
a numbering for the lines of the DataGridView
?
Do you want to number lines from 1 to the general amount? a reminder if you are ACCESS by the look and are using Dataadapter it is kind of slow ...
– novic