Thank you Tony, it works and the bonus is the tree grid. I can see now the line with the if (typeof onclickSubmit…
Hi Tony,
I found the method delGridRow in grid.formedit.js but there is no if( typeofp.onclickSubmit === 'function') in it. Yes, there is beforeSubmit and afterSubmit but no onclickSubmit… I guess I should download again. I can't see any version identifier in the file to send you. Should I mail you the file?
I thank you and appreciate your involvement,
Shimon
Hi Tony,
The MemNo is a global variable to the page and if my onclickSubmit was invoked then the return {wmemno: MemNo} would have worked. The MemNo is not a field in the row. If I can get onclickSubmit to work I should hope that the returned value is added to the posted data.
Could you give me a hint to look for why my onclickSubmit is not invoked?
Renso: MemNo is a global variable and I have it through the page but it is the ajax invoked url that needs it as an input. However your suggestion made me see that I can add it to the editurl and every time it changes I should setGridParam({editurl: 'myjsp.jsp?wmemno='+MemNo}) and it works
Thank you Tony and Renso. I still think that the onclickSubmit is a nicer looking solution if I can make it to work.
My grid displays all records of one membership, the table has records of multiple memberships. Each row is one record with an id assigned within the same membership number. The row_id is unique to the grid but not to the table. In the table in order to delete a row I need the membership number plus the row_id. For edit and add the grid is passing all the values of the row in the posted data, for delete it passes only the row_id and the action {oper: “del”}. Therefore, in edit and add I attach an additional property to the row and thus the jsp receives the membership number, in delete attaching a membership number as an additional property does not make it available to the jsp since the row is not passed as posted data. I thought that the delData property of the grid would accomplish this but I tried both static in the construction of the grid and dynamic in the beforeSubmit with no success.
If onclickSubmit is not called, in my case, and then if I use the beforeSubmit to set the delData with {wmemno: MemNo} and it is not posted to the editurl then how can I post the data for delete? I could have added it to the url as Get data but it would be static and once the membership number is changed it would stick to the first one set.
The only other way I can think of is: in the beforeSubmit, call (ajax or similar) the editurl jsp direclty with the row_id and membership number posted to it.
I have added the alert to all three (edit, add, delete) onclickSubmit and none shows up. How is it that my event function is not executed?
Thank you Tony,
I have tried the onclickSubmit before and the value received in wmemno was null, I tried it again now and still the value passed is null. There is a value in MemNo.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top