How to override submit button event in add/edit dialog in jqGrid
===

i am using jqGrid for scheduling process. In the grid, i am displaying the working hours and other details of employees under a department. On clicking a row in the grid, another grid has to pop-up which gives details of the corresponding row in the master grid. for example u can refer http://trirand.com/blog/jqgrid/jqgrid.html.(adanced>masterdetails). This shows an example of two grids where on clicking a row in master grid u get the invoice details in the below grid. I too need same functionality and added to it, i have to add/edit the rows in the second grid. Both the grid datatype are local. On clicking submit button in the add/edit dialog i want to over ride the default action which submits the data to the server, and write my own function. THe function is to store the added details/edited details into an object and bind it as a data block to a div. 

I tried onclickSubmit, but it was still invoking the default method.
Added to this, i would like to relaod the grid with the new row.