The following function is implemented to to remove all selected rows if met the condition from UltraGrid and from database:
private void RemoveRows()