Forum



18:31

11/03/2010

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
14:08

Moderators
30/10/2007

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.
19:09

11/03/2010

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
05:43

11/03/2010

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
Most Users Ever Online: 715
Currently Online:
57 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66