You could use a multi-threading approach.
private void btnStart_Click(object sender, EventArgs e)
{
int nRows = 0;
Thread test = new Thread(()=>Foo(nRows));
test.Start();
}
private void Foo(int nRows )
{
DeleteRows deleterows = new DeleteRows(nRows);
deleterows.Showdialog( );
For(int nIndex = 0; nIndex <= nRows; nIndex++)
{
datatable.Rows.RemoveAt( 0 );
}
}