john

Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • john
    Participant

    i should add, i use firebug to show me the layout of the json data being sent to the server. then for each event i note the name of the event and the name of the following event in the JSON and replace it as shown in the java sample.

    john
    Participant

    No, i had to work arround it. when i save the grid i have to first edit it in the java service code to remove all events before saving it to the database.

    The code i use to do that is as follows

    public void saveGrid(String grid, String user, String report) {

    System.out.println(“>>>GridServiceImpl.saveGrid”);

    // strip out all grid events (e.g. onSelectRow, onPaging, gridComplete

    int i = grid.indexOf(“onSelectRow”);

    int j = grid.indexOf(“onSortCol”) – 1;

    grid = grid.substring(0, i) + “onSelectRow”:null,” + grid.substring(j) ;

    i = grid.indexOf(“onPaging”);

    j = grid.indexOf(“onSelectAll”) – 1;

    grid = grid.substring(0, i) + “onPaging”:null,” + grid.substring(j) ;

    i = grid.indexOf(“gridComplete”);

    j = grid.indexOf(“loadError”) – 1;

    grid = grid.substring(0, i) + “gridComplete”:null,” + grid.substring(j) ;

    System.out.println(grid);

    try {

    Model.perform(“saveGrid”, new Object[] {user, report, grid });

    } catch (Exception e) {

    e.printStackTrace();

    }

    }

    in reply to: Search form miss a Cancel button #86753
    john
    Participant

    An excellent solution

    Highly Recomended

    thanks


    in reply to: how can i use the showlink formatter type #85674
    john
    Participant

    your code here reads

    formatter:'link'

    not

    formatter:'showlink'

    in reply to: Want to export all the records from jqgrid into an excel file #85620
    john
    Participant

    i do this in my application but its not a feature of jqGrid.

    Basically i put an link labeled 'Export' on the same page as my grid.

    Export

    When the user clicks on it the web server servers up the TodayReport_export.jsp page.

    This page has contentType=”application/vnd.ms-excel” and contains a standard HTML table which is built dynamically using a c:foeEach tag

    Hope that helps

    in reply to: how can i use the showlink formatter type #85560
    john
    Participant

    Brilliant (as are you 🙂 )

Viewing 6 replies - 1 through 6 (of 6 total)

Stay connected with us in your favorite flavor!