DataGridView
-
I update the DataSet but the DataGridView still show me the old Data This my Code : adap.SelectCommand = cmd; ds.Tables.Remove("CreditCardInfo"); adap.Fill(ds, "CreditCardInfo"); dtgCreditInfo.DataSource = ds; dtgCreditInfo.DataMember = "CreditCardInfo"; dtgCreditInfo.Update(); Please i need help, it's urgent Thanks so much
Assaf
-
I update the DataSet but the DataGridView still show me the old Data This my Code : adap.SelectCommand = cmd; ds.Tables.Remove("CreditCardInfo"); adap.Fill(ds, "CreditCardInfo"); dtgCreditInfo.DataSource = ds; dtgCreditInfo.DataMember = "CreditCardInfo"; dtgCreditInfo.Update(); Please i need help, it's urgent Thanks so much
Assaf
-
I'm sorry Assaf, what exactly u want to do ? if u want to get the latest data why dont u use datatable.
Regards, Tomi
I have alredy the data in the dataset, the data i want to display in the datagridview i have it but the datagridview still show me the old data "You mean to fill the datatable from the adap and reuse instead of the dataset?" Thanks a lot -- modified at 1:32 Monday 10th September, 2007
Assaf
-
I have alredy the data in the dataset, the data i want to display in the datagridview i have it but the datagridview still show me the old data "You mean to fill the datatable from the adap and reuse instead of the dataset?" Thanks a lot -- modified at 1:32 Monday 10th September, 2007
Assaf
Yes, if u want to show the latest data then u should use datatable instead dataset For Example :
string conect = ConfigurationManager.ConnectionStrings["CON"].ToString(); SqlConnection conn = new SqlConnection(conect); SqlDataAdapter da = new SqlDataAdapter ("Select * From MyTable",conn); DataTable dt = new DataTable(); da.Fill(dt);
Hope this can help solve u'r problems :) -- modified at 2:01 Monday 10th September, 2007Regards, Tomi