How to fetch on screen grid data in Javascript array

QuestionsHow to fetch on screen grid data in Javascript array
Shivraj asked 10 years ago

I am exploring phpgrid for one of my project, I am not expert in web development.

In my project I will have button on grid page, on clicking the button, I need all grid data in Javascript array[2D] for further usage.

I tried with regular Jquery methods considering "list1" as table id. but it is not working. Could you please guide how to do that?

You can find my code at below link
http://pastebin.com/7szXi3BD

1 Answers
Abu Ghufran answered 10 years ago

You can use getDataIDs function, where list1 is grid id.

var ids = jQuery('#list1').jqGrid('getDataIDs');
for (i = 0; i < ids.length; i++) {
alert(ids[i]);
}

Your Answer

6 + 6 =

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?