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_Related Related Topics sp_TopicIcon
reloadAfterSubmit & editGridRow problem, maybe a bug
05/09/2010
18:31
Avatar
ivanchain
Member
Members
Forum Posts: 55
Member Since:
11/03/2010
sp_UserOfflineSmall Offline

Hi there, I have 2 issues that I am not sure if it is a bug in jqgrid or I am missing something.

I am in jqgrid 3.6, and I create a jqgrid like this:

jQuery(“#list”).jqGrid({url:'/KPIGetData/DimData.aspx?SearchInput=childuserforedit,   

datatype: 'json',height:'auto',colModel :

[{label:'olapkey',name:'olapkey', index:'olapkey',width:55, sorttype:'int',hidden:true, align:'center',classes:'JqGrid'},

{label:'test',name:'test', index:'test',width:55, sorttype:'int',hidden:true, align:'center',classes:'JqGrid'}

],

pager: 'pager1',

sortname: 'olapkey',

gridview:true,

scroll:false,

rowList:[10,20,35],

rowNum:35,

sortorder: 'desc',

viewrecords:true,

caption: ‘’

});

Yes, I can create the jqgrid well, and the data could be loaded from server well, and I can edit the data and save it back to the server well !  But the problem is:

Issue 1. if I set the reloadAfterSubmit:true in editGridRow, a strange thing will happen:

   var grid = jQuery("#list1");

   var rowKey = grid.getGridParam("selrow");

 grid.editGridRow(rowKey, {top:setcentertop(500),left:setcenterleft(1100),width:"1100",editCaption:"edit"+currentEditName,bSubmit:"saveit",bCancel:"exitout",reloadAfterSubmit:true,

                       mtype:"POST",
                       url: "/KPIGetData/DimSavingData.aspx

   });

When I click the save button in the edit form, the  data will be saved to the server sucsessfully, aftter that, I click the exit button to close the edit form,  then I click another row of the jqgrid, the strange thing just happened:  the new row is chosen, but the old row is still highlight and kept the selected row color! So there are two rows selected in the jqgrid(I never set the mulitselect option)!  I have tried to set the reloadAfterSubmit:false, yes, if the reloadAfterSubmit:false, this problem is gone.

Issue 2. It's about the Pre/next button in the edit form, and seems very similar to the Issue 1.

In the edit form at Issue 1,  if I click the Pre/next button,  the same strange thing will happened: in the jqgrid, the new row is chosen, but the old row is still highlight and kept the selected row color! So there are two rows selected in the jqgrid.

Pelase help, maybe it's a bug in 3.6

yours,

Ivan

                      

10/09/2010
06:43
Avatar
ivanchain
Member
Members
Forum Posts: 55
Member Since:
11/03/2010
sp_UserOfflineSmall Offline

Tony, please?

this problem drive the pre/next button can't really be used in editform.

yours

Ivan

11/09/2010
14:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

1), 2) The problem that maybe you have is that you have equal row ids into the grid or ids which are not correct.

Please check these. Also check what is your new rowid after the  new row is inserted.

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.

12/09/2010
19:09
Avatar
ivanchain
Member
Members
Forum Posts: 55
Member Since:
11/03/2010
sp_UserOfflineSmall Offline

Tony, I have checked it, this is the json return like:

{"page":1,"total":5,"records":132,"rows":[{"id":1,"cell":["799","/KPIupload/SelfPhoto/my.jpg","/KPIupload/SelfPhoto/my.jpg","刘菲112","2","男","汉","2","共产党员","1","未指定","01/04/1985 00:00","06/08/2000 00:00","04/01/2001 00:00","3","北京市","3","已婚","42010719761124411X","6524021","0755-7564325","13007755431","idr@hotmail.com","深圳市宝安区13号","张兰","1302984321","1","未指定","1","未指定","1","未指定","1","未指定","799","12345678","","123456","1|1|1|1|1|1|1|0|1","3:销售部","1","1","1"]},{"id":2,"cell":[.......].......

}

you could see,  the "id" in the "rows" is added itself and have NO equal row ids into the grid. In fact I create the id in the server code like:

                    t =t +1;
                    JQGrid.Row row = new JQGrid.Row();
                     row.id =t;

So  the rowid is always added itself and will not be equeal between every two rows.

I can't see anything wrong with the rowid.

yours,

Ivan

15/09/2010
05:43
Avatar
ivanchain
Member
Members
Forum Posts: 55
Member Since:
11/03/2010
sp_UserOfflineSmall Offline

tony, any other sugguestions?

I add the grid just like what the example do.

It's not about the Insert. Don't insert anything, just load the grid, and try the pre/next button, move the editform aside from the screen to see the grid behide it,  you will see there are two  current rows selected at the same time.

yours,

Ivan

20/09/2010
03:27
Avatar
ivanchain
Member
Members
Forum Posts: 55
Member Since:
11/03/2010
sp_UserOfflineSmall Offline

Tony, please.

I found if I add the data manually(I mean, don't set the data's url, just add data at the client side), there is no such prev/next button problem.

But if I use the data url to get the data, the prev/next button problem is there.

Could you have a check about this?

yours,

Ivan

04/11/2010
12:56
Avatar
ivanchain
Member
Members
Forum Posts: 55
Member Since:
11/03/2010
sp_UserOfflineSmall Offline

tony, any other sugguestions?

half a year passed, but the problem is still there....

yours

ivan

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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