There is one basic flaw in your Code.
You were binding on click to just button tag, but in your HTML there were no button tags, there were input tags with button type.
After this you are creating a variable called "id" which is unnecessary in this case. With jQquery you do not need this.
Using the following line of code takes care of everything.
So simplify life and make this the jQuery as short as possible.
$(this).parent().parent().remove();
As far as you #divGrid being empty is a false statement as the div will never be empty unless you remove the entire #myTable child element
You can do that by using the following condition
if( $('#divGrid ').is(':empty') ) {
$('#divGrid').html("All item removed");
}
Here is the solution with just 3 lines of jQuery that you really need.
EDIT: Here is a fiddle to check the rows being empty and if empty then the table will be replaced by the text "All items removed"
Working Fiddle