Skip to content

jqGrid link shows line number instead of Id

November 8, 2011

If you use a ‘showlink’ formatter inside jqGrid and it formats url incorrectly showing line number instead of record Id. For example, according to loaded data your url should be:

http://yoursite.com/page.aspx?id=1023

http://yoursite.com/page.aspx?id=1024

http://yoursite.com/page.aspx?id=1025

etc.
but jqGrid generates

http://yoursite.com/page.aspx?id=1

http://yoursite.com/page.aspx?id=2

http://yoursite.com/page.aspx?id=3

etc.
Then check Id property of jsonReader, you might be missing it:
jsonReader: {
root: “rows”,
page: “page”,
total: “total”,
records: “records”,
repeatitems: false,
id: ‘RecordId’
}

About these ads

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: