Close the window without reload the grid

there is a dhtmlgrid in the page ,when i click the add button ,i will open a window,the widow has a form ,submit button and cancel button in it.when i click the submit button,a row will be added and the window will closed the dhtmlgrid will reload.now i don’t want when i click the cancel button and x the dhtmlgrid is also reload.
how can i solve it? i use dhtml pro 3.6

Couldn’t you provide the code that you are using.