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
JqGrid - shows less than it should
31/01/2013
12:00
Avatar
kat15pl
Lodz, Poland
Member
Members
Forum Posts: 4
Member Since:
31/01/2013
sp_UserOfflineSmall Offline

Hi,

I'm reading from database about 10 rows, but JQGrid displays me only 7 (I have 1 page, and I have "View 1 - 7 of 7"). I can search by missing rows, or sorting but it always display 7 rows:( . In other place of site it is ok (it displays about 40 rows, which is properly)

Any suggestion?

BTW. Sorry 4 my english

31/01/2013
22:20
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

How do you read the database?

Do you use JSON or XML,

Do you have configured the readers correct.

No answer will be,  if your description is not approved with a test case.

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.

01/02/2013
11:36
Avatar
kat15pl
Lodz, Poland
Member
Members
Forum Posts: 4
Member Since:
31/01/2013
sp_UserOfflineSmall Offline

Hi,

Thanks for replying.

Firstly I think I must say that I'm writing in asp.net.

I read DB directly from SQL (using SqlConnection). The same method in other part of my system works perfectly. Only in this part it shows only 7, not 10 (it read from DB 10 rows, which I'm sure because I debug my site). I can search by "hidden" rows, but always display 7.

BTW. Maximum row page is set to 25.

01/02/2013
11:50
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hi,

jqGrid is pure JavaScript solution. So what you can do is to use Fiddler, Firebug, Developer Tools of IE or Chrome or any other tool to catch the exact JSON response of the server. If you save the JSON response in the file with the name like "test.json" you can use url: "test.json" to reproduce the problem without you server environment. You should just provide the HTML page with the JavaScript code which you use. If you see that the problem is do on the server side then you need debug it yourself because it has no relation with jqGrid.

By the way Fiddler works as HTTP proxy. So using Fiddler one can catch any HTTP trafic in any environmat with any servers and then having the traces one can use Fiddler in autoresponse mode. So the fiddler will answer on the requests with the previously saved responses without having the server environment.

In the answer you can find and download an example of ASP.NET code which works with jqGrid without any problems. 

Best regards
Oleg 

01/02/2013
11:59
Avatar
kat15pl
Lodz, Poland
Member
Members
Forum Posts: 4
Member Since:
31/01/2013
sp_UserOfflineSmall Offline

Thanks for reply,

Ok, my english is bad:)

I don't use json, I get rows by (C# code):

DataTable dt = module.Search(pageSize, startIndex, orderByColumn, searchExpression);

This function makes query string and return rows.

Like I said the same schema works in other part of site. I thought it could be by polish letters, but when I deleted them it doesn't improve.

01/02/2013
12:09
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

I am sure that your server returns either JSON or XML because it's only two formats which supports jqGrid. Which value has datatype parameter of jqGrid which you use? If you don't specify any datatype parameter then default value "xml" will be used. Do you tried to use any Tools to catch HTTP trafic like I described before? If you use Windows computer then you have Internet Explorer. If you press F12 in IE the Developer Tools will be started. You can choose "Network" tab and click "Start capturing" button. Developer Tools will catch all HTTP requests and responses and you can examine it.

01/02/2013
12:28
Avatar
kat15pl
Lodz, Poland
Member
Members
Forum Posts: 4
Member Since:
31/01/2013
sp_UserOfflineSmall Offline

Ok, I see that I get 7 rows in response.

In JQGrid1_DataRequesting(object sender, Trirand.Web.UI.WebControls.JQGridDataRequestEventArgs e) function in debug mode I get 9 rows.

In this function I have:

            JQGrid1.DataSource = dt;

            JQGrid1.DataBind();

dt = DataTable with 9 rows

OK. I found my error. Function GetRowCount returns 7 not 9 🙂

Now it works:)

Thanks anyone:)

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
51 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