Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Search to Web Api Example?
19/07/2014
01:27
Avatar
tconrad
New Member
Members
Forum Posts: 2
Member Since:
18/07/2014
sp_UserOfflineSmall Offline

I've been looking over Google and StackOverFlow for a good C# MVC4 example of jqGrid implementing searching into a web api method but I've been coming up empty. Can anyone point me to one? I've used fiddler to format the method signature to be able to create the web api method signature but it seems like there're parameters that aren't even defined in the url. Here's an example... 

/api/mymethod?Id=1&callback=jQuery2110027593754697591066_1405696486270&_search=true&nd=1405721700853&rows=10

&page=1&sidx=id&sord=asc&searchField=STATE&searchString=CA&searchOper=eq&filters=&_=1405696486272

I have no idea how to define this last parameter '_=1405696486272', and I don't know what this one 'nd=1405721700853' means. 

I have been able to get paging and sorting implemented through the web api using this signature

public dynamic Get(int Id, bool _search, string nd, int rows, int page, string sidx, string sord) { ... }

 and it works great. It just  seems like there would be a better way to accomplish this without tightly coupling a user control to a RESTFUL service method call. I'm just not familiar enough with this grid. Any pointers would be great.

 I am using jqGrid  4.6.0 - jQuery Grid 

Thanks,

Tim

21/07/2014
11:29
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

I do not know from where come this parameter:
'_=1405696486272'

but the parameter

'nd=1405721700853'

is generated automatically from the grid. The availability of this parameter was the old IE version which caches the result when a new request is made without changing the parameters. Actually you do not need to add these.

Kind Regards

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

24/07/2014
02:23
Avatar
tconrad
New Member
Members
Forum Posts: 2
Member Since:
18/07/2014
sp_UserOfflineSmall Offline

thanks Tony

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
34 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information