My code:
//ERP_AR is entity framework model
ERP_AR oOC = new ERP_AR();
List
BindingSource bs =new BindingSource();
bs.DataSource = oList;
datagridview1.DataSource=bs;
//The issue is could i cast back datagridview1.DataSource back to oOC
BindingSource bs_temp;
bs_temp = (BindingSource) DataGridView1.DataSource; //SUCCESS cast back to binding source
ObjectContex oOC_Temp;
oOC_Temp = (ObjectContex) bs_temp;// --> NOT SUCCESS Cannot cast
Thx
VulpesRank #55 · 29.2K reputationPosted Jun 9, 2012, 2:54 AM EDT
Herry Ng22 reputationPosted Jun 10, 2012, 7:19 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts