poonam
poonam

Reputation: 43

Java code for reloading jqgrid

I'm using jqgrid in a web application. And all operation on jqgrid is been performed through Java code. I’m using Hibernate MVC for this. I want to reload grid after some operation. Is there any code which I can use in my servlet to reload jqgrid???

Upvotes: 0

Views: 203

Answers (1)

Lee
Lee

Reputation: 11

i think u cannot control the gird through servlet or something else at the server side, but jqgrid can catch the status from server through server response after a add or edit operation, so i use this way, just write a status String "success" with json in your response after a success save or update operation at server side, the code is :

    JsonObject status = new JsonObject();
    status.addProperty("status", "success");
    response.getWriter().write(status.toString());

and then, your grid will automatically reload after add or edit. And it do works with jqgrid 3.8 but im not sure it serve the purpose with 4.x

Upvotes: 1

Related Questions