This is my code:
private void button1_Click(object sender, EventArgs e){
int index = dataGridView1.CurrentCell.RowIndex;
Model1.DevicesInfo_Tbl Device_Info_Obj = new Model1.DevicesInfo_Tbl();
Device_Info_Obj.DevicesName.Remove(index, index);
E_Shop_DB_Obj.SaveChanges();
dataGridView1.Refresh();
}
I can't understand where my code is wrong. Compiler got an error when arrive to Device_Info_Obj.DevicesName.Remove(index, index);
. How can i fix it?
I want to delete selected row in Data Base.