mardi 31 mars 2015

Save datagridview into database - error occcured

I try to save the datagridview data into the database. But I don't know how to store it. I try some methods but it return error. So please I need to know how to rectify this error and my code is



string Stu_rollno = dataGridView1.Rows[i].Cells[1];
string sub_code = dataGridView1.Rows[i].Cells[2];


My error is;



Cannot implicity convert type 'system.windows.Forms.Datagridviewcell' to 'string'



Please give solution for this problem.


Aucun commentaire:

Enregistrer un commentaire