Value of column?

QuestionsValue of column?
Tim Moore asked 2 years ago

I am trying to get the value from another column but instead it is returning this https://imgur.com/a/EtpqUcC. I am sure it is something i have messed up, can you please help me with this issue.

https://gist.github.com/tmoore88/bed8db0c67e837bc5587dca24a876724

Thanks, Tim

4 Answers
Abu Ghufran Staff answered 2 years ago

Hello,

Looks like it’s already in edit mode so content of cell (which is html input) is fetched.

Instead of following:
var val = jQuery(‘#list1’).jqGrid(‘getCell’, selr, ‘job_open’);

Use this:

var row = $('#list1').getRowData(selr);
alert(row["job_open"]);
_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Tim Moore answered 2 years ago

I get the exact same answer from the alert.

View post on imgur.com

Thanks,

Tim

Abu Ghufran Staff answered 2 years ago

I tried your scenario again and this behavior exist. One solution is to set the job_open field as editable:false. It will not change it in edit box and you will get the value by above both ways.

I don’t exactly understand if you want to keep job_open as editable and if it’s changed by the user in edit mode then behavior for job_status need to clarified.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Tim Moore answered 2 years ago

This solution is acceptable and works for what I am trying to do.

Thanks for your time,

Tim

Your Answer

15 + 15 =

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?