I have been messing with this for quite some time now and it's getting less and less fun; I followed the MSDN guide for deleting a row from a datagrid. And it works for any row however I am not able to specify the row... essentially I can delete random rows by using the CurrentIndex
parameter anything I try to be more specific gets me a conversion errors.
In a nut shell 'FindByID' (my Primary Key) gives me 'object to long' errors etc. Can't nail down the row I want removed.
//int ThisRow = radGridView1.CurrentIndex.Value;
// Locate row for deletion
VSConnectorDataSet.TestTableRow oldTestTableRow;
oldTestTableRow = vSConnectorDataSet.TestTable.FindByID(
Int64.Parse(radGridView1.CurrentRow.Cells["ID"].Value));
// Delete the row from the dataset
oldTestTableRow.Delete();
// Delete from database
this.testTableTableAdapter1.Update(this.vSConnectorDataSet.TestTable);
//DataRow rowDel=vSConnectorDataSet.TestTable.Rows[ThisRow];
//rowDel.Delete();
//testTableTableAdapter1.Update(vSConnectorDataSet);