سلام
آقاجان چرا داد می زنی از خواب بیدارم کردی
بابا یه سوال پرسیدم(اونم اولین سوالم از اینترنت) هنوز کسی جواب نداده تا حالا چند تا سوالم جواب دادم.
جواب شما هم اینه: یه تابع نوشتم ببین خوشت می یاد
private void fnDelete()
{
//ask user if wanting to delete
DialogResult dr=MessageBox.Show("Are you sure you want to delete this row ? ", "Confirm deleting", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dr ==DialogResult.Yes) //if
{
//user clicked the "Delete" button
DataTable tbl=new DataTable("MyContactsTable");
tbl=this.dataSet11.Tables[0];
int i=this.iRowIndex;//get the index of the row you clicked
tbl.Rows[i].Delete(); //delete the row
this.oleDbDataAdapter1.Update(tbl); //update the table
this.fnRefresh(); //refresh the table
}
}