Retrieving value

QuestionsRetrieving value
Dan asked 9 years ago

Is it possible to get the value of the first column (The Table ID, which is hidden) when edit is selected? I would like to store this in a session variable for other tasks related to the ID

3 Answers
Abu Ghufran answered 9 years ago

You can pick it via JS code OR pass to your PHP page for your operations.

e.g.
$col["default"] = "<a href='http://localhost/?id={id}'>My Page</a>";

JS:
On client side, you can have ids in this way, where "list1" is grid identifier.
var selr = jQuery('#list1').jqGrid('getGridParam','selrow');

Dan answered 9 years ago

I have looked at the 2 options you have presented. If I use the JS code on a click event of the div tag for the grid, as I don't know how else to fire an alert to look at the ID that it returns, please forgive me Am I missing something? here is a function I found on the site that I trying to implement, I will build a query string if I can get the ID out of the grid.
function get_parent_name()
{
// read value from selected row of list1
var selr = jQuery('#list1').jqGrid('getGridParam','selrow');
var rd = jQuery('#list1').jqGrid('getCell', selr, 'Time_ID');

alert(rd);
}

Abu Ghufran answered 9 years ago

If you can share the complete code for review, i can suggest the changes.
It's difficult to identify issues with code snippets.

You can email at [email protected]

Your Answer

0 + 4 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



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?