on edit how to update a field with value of a session var?

Questionson edit how to update a field with value of a session var?
Tasagore Seibei asked 2 years ago

Hi

 

I’ve added a custom button to my grid and when I click it I get the id of the selected field (if any). I want to update a specific field on the row and reload the grid, I guess I need to create a ajax function but I’m not sure if there is a easiest way to do it.

The button code gets the id with this:

var ids = jQuery(‘#list1’).jqGrid(‘getGridParam’,’selrow’);

si I have in ids the id of the field, now I want to execute a query like:

update mytable set status=’X’ where id=$ids

Should I use ajax for this or there is any way to define a function in the grid and just call to execute it from the javascript button code?

Thanks in advance



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?