I want to do this (on Form3):
sqlcon.Open();
string selectQuery = "SELECT * FROM InvoiceTable where id = @id";
SqlCommand sqlcmd = new SqlCommand(selectQuery, sqlcon);
sqldr = sqlcmd.ExecuteReader();
while(sqldr.Read())
{
textbox1 = Max value of TotalCostColumn.value
or
textbox1 = Latest value of TotalCostColumn.value
or
textbox1 = 2nd row of TotalCostColumn.value
}
Im not having any datagridview on this form. I do have a datagridview on Form1 which is the actual invoice form. Form3 is the confrimation form which lets the user confirm how much customer should pay eventually. I want the TotalCostColumn's value from my database to be transfered in the related textbox in Form3.
textbox1,Form1button42etc... refers to?