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
Loading grid with jqGridImport & loadonce
21/01/2010
12:41
Avatar
rotoflex
Member
Members
Forum Posts: 16
Member Since:
21/01/2010
sp_UserOfflineSmall Offline

Hi,

I'm having a bit of a problem with jqGridImport and loadonce. What I'm trying to do is load grid configuration and data using json with one single load. I've defined loadonce parameter to true. Grid loads just fine and everything else seems to work as it should, but when I try to sort grid clicking one of the columns, "Loading.." text appears and data is loaded again from url defined in grid. This happens only at the first time, the second time I click column grid is sorted using data in grid and without request being sent to server.

I've tried searching this forum and googling but haven't found any solutions how to fix this, so if anyone can give me hint what to try with this, that would be great!

One feature request; would it be possible to get somekind of failure event when importing grid?

22/01/2010
14:58
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Could you please send me the string that is used in jqGridImport?

Also which version is used.

One feature request; would it be possible to get somekind of failure event when importing grid?

Thanks for this. I have missed this. ajax options will be added in this method and this will be available in the upcomming 3.6.3 release.

Best Regards

Tony

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.

11/02/2010
11:06
Avatar
rotoflex
Member
Members
Forum Posts: 16
Member Since:
21/01/2010
sp_UserOfflineSmall Offline

Hi Tony,

Sorry for my late reply. I finally got some time to build you an test grid. Originally I was using version 3.6.2, but I tried with version 3.6.3 today with no difference in result.

Here's the string that import returns:

{"grid":{"ajaxGridOptions":{"cache":false},"autowidth":true,"caption":"TestGrid","cellEdit":false,"cellsubmit":"clientArray","colModel":[{"align":"left","editable":false,"editoptions":{},"editrules":{"custom":false,"date":false,"edithidden":false,"email":false,"integer":false,"number":false,"required":false,"time":false,"url":false},"edittype":"text","formoptions":{"colpos":0,"elmsuffix":null,"rowpos":0},"hidden":false,"hidedlg":false,"index":"Id","label":"Id","name":"Id","sortable":true,"sorttype":"text","width":0},{"align":"left","editable":false,"editoptions":{},"editrules":{"custom":false,"date":false,"edithidden":false,"email":false,"integer":false,"number":false,"required":false,"time":false,"url":false},"edittype":"text","formoptions":{"colpos":0,"elmsuffix":null,"rowpos":0},"hidden":false,"hidedlg":false,"index":"Value1","label":"Value1","name":"Value1","sortable":true,"sorttype":"text","width":0},{"align":"left","editable":false,"editoptions":{},"editrules":{"custom":false,"date":false,"edithidden":false,"email":false,"integer":false,"number":false,"required":false,"time":false,"url":false},"edittype":"text","formoptions":{"colpos":0,"elmsuffix":null,"rowpos":0},"hidden":false,"hidedlg":false,"index":"Value2","label":"Value2","name":"Value2","sortable":true,"sorttype":"text","width":0},{"align":"left","editable":false,"editoptions":{},"editrules":{"custom":false,"date":false,"edithidden":false,"email":false,"integer":false,"number":false,"required":false,"time":false,"url":false},"edittype":"text","formoptions":{"colpos":0,"elmsuffix":null,"rowpos":0},"hidden":false,"hidedlg":false,"index":"Value3","label":"Value3","name":"Value3","sortable":true,"sorttype":"text","width":0}],"colNames":[],"datatype":"json","editurl":null,"forceFit":false,"gridview":true,"height":"100%","jsonReader":{"root":"Rows","page":"Page","total":"TotalPages","records":"Records","userdata":"UserData","repeatitems":false,"id":"0"},"loadonce":true,"multiboxonly":false,"multiselect":false,"pager":"#TestGridPager","pgbuttons":false,"pginput":false,"resizeStop":null,"rowNum":-1,"sortable":true,"sortname":"Id","sortorder":"asc","subGrid":false,"toolbar":"[false,'']","treeGrid":false,"url":"\/testApp\/TestGridService.svc\/GetTestGridData?","viewrecords":true},"data":{"Page":0,"Records":0,"Rows":[{"Id":1,"Value1":"Sample","Value2":"Moon","Value3":"Car"},{"Id":2,"Value1":"Test","Value2":"Earth","Value3":"Bicycle"},{"Id":3,"Value1":"Another test","Value2":"Sun","Value3":"Airplane"}],"TotalPages":0,"UserData":{}}}

Grid is imported with this:

$("#TestGrid").jqGridImport({
             imptype: "json"
                , impurl: '<%=System.Web.VirtualPathUtility.ToAbsolute("~/")%>TestGridService.svc/GetTestGridData'
                , jsonGrid: {
                    config: "grid",
                    data: "data"
                }
         });
14/03/2010
15:49
Avatar
rotoflex
Member
Members
Forum Posts: 16
Member Since:
21/01/2010
sp_UserOfflineSmall Offline

Can anyone help me with this one?

14/03/2010
16:35
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

If the data is a part from the import string in your case a datatype:'local' should be set, since to load the data from the import string we first save the datatype, insert the data and then put back it again.

Regards

Tony

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.

18/03/2010
14:02
Avatar
rotoflex
Member
Members
Forum Posts: 16
Member Since:
21/01/2010
sp_UserOfflineSmall Offline

Thanks again Tony! I had completely missed such an obvious thing.

Regards,

Janne

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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