I have a datagrid which is connected to a datatable.
This datatable has got around 7000 rows. I want to update 3 columns in all the 7000 rows.
Currently I am using following code :
this.dataGrid1.DataSource = null;
foreach(DataRow dr in DealsTable.Rows)
dr["MarketRate"] = "dummy";
dr["PandL"] = "dummy1";
dr["PandLUSD"] = "dummy2";
this.dataGrid1.DataSource = DealsView;
The foreach loop takes up lot of time. Is there a way where I can do the bulk update of these rows ?