0

Can this be possible, I created a Jquery grid struts2. What I did was added this in the Jquery grid.

<s:url id="editurl" action="nedit"/>

Then added this options in the

navigator="true"
            navigatorAdd="true"
            navigatorSearch="true"
            navigatorRefresh="true"
            navigatorDelete="true"
            resizable ="true"
            draggableZindex="true"
             navigatorAddOptions="{height:525, width:425, readAfterSubmit:true, draggable:true, resizable:true}"
              navigatorEditOptions="{height:525, width:425, reloadAfterSubmit:true, draggable:true, resizable:true}"
              navigatorDeleteOptions="{height:200, width:200, reloadAfterSubmit:true, draggable:true, resizable:true}"

Then enable the collumn of the grid to be editable by adding editable="true".

 <sjg:gridColumn name="serial_Number" 
                            index="serial_Number" 
                            title="Serial_Number" 
                            editable="true"
                            sortable="true"/>

Because of that, There are now buttons where you can add, edit and delete record. + for add record, pen for edit record.

Is there a way in which when I click the + or pen button I will use my created form to add the new records? I don't want to use the dialogue box with form created when i click the + or the pen button. I want to use my own form.

As a summary, this is what i like to be done. When I click the + it will transfer to my add record action. When the pen button is click it will go to my edit action plus the key records coming from the grid.

Hope my question is comprehensible.

Thanks

4

1 回答 1

0

您可以添加addfuncin以便网格将运行您navigatorAddOptions的 自定义函数。您可以在自己的函数中调用自己的表单。editfuncnavigatorEditOptions

更多信息在这里

http://www.trirand.com/jqgridwiki/doku.php?id=wiki:navigator

于 2013-01-22T01:46:30.940 回答