Try to reserve the space for update and cancel buttons even though they are not visible.
Don't know how you are doing it, but placing both the buttons in a div and setting its visibility style to hidden, will hide the buttons but the DIV will reserve the space required to display them.
In this way, when you show the div containing the buttons, your UI will not look like shifting around.
<div id="hiddenButtons" style="visibility: hidden;">
<input type="button" />
<input type="button" />
</div>
To display the buttons,
<div id="hiddenButtons" style="<b>visibility: visible;</b>">
<input type="button" />
<input type="button" />
</div>