Forum
09:52
01/09/2008
Mark or Tony,
How do you pull from the jqgrid36 branch of at Github? Since the download is a little old, I'd like to just pull and merge everything from Github. However, I don't know git commands. It looks like "clone" is pulling from Master which I think is the 3.5 version. I'd like to get the 3.6 "latest" .
Any pointers on using git? I have searched the web for hours but the git commands suggested don't seem to work. This should be simple but I can't seem to get the latest 3.6 version to pull. What command should I use?
Thanks,
Pete
14:25
24/09/2009
This may or may not affect other stuff (looks like it's a temp variable, so maybe not it's all inside a function so it shouldn't matter), but I've been playing around the source and found a potential semantic error something that may cause problems in the future:
should probably be:
at this location:
http://github.com/tonytomov/jq.....id.js#L142
This is misspelled on lines 142, 144, 157, & 158
15:10
01/09/2008
Michael Greene said:
git clonewas the correct command, but after you've cloned the repository this way, you should
git branch jqgrid36to switch to the 3.6 branch
I must still be doing something wrong (I am running the Windows version of git, BTW) If I first run:
git clone git://github.com/tonytomov/jqGrid.git
and then run
git branch jqgrid
Is there something else I need to do?
When I take a look at grid.base.js I still see the 3.5.3 version marker and just about everything else looks the same. Is there any way I can tell I have the complete and correct release? I just hate to go through all the hassle and update and find out I have the same stuff.
Thanks
Pete
15:26
23/10/2009
I am trying the demo of 3.6 and getting the following in Firebug:
uncaught exception: [Exception... "Could not convert JavaScript argument arg 0" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: file:///E:/tgnew/sensadata/sensadata/jqgrid-36b/js/jquery.js :: anonymous :: line 12" data: no]
I am connecting to a MySQL database on another machine on the local network. The data is accessable from another tool.
Any suggestions?
10:56
Hi Tony,
First of all, congratulations on the new release.
I have been using jqgrid 3.4.1 in my project. The way I designed the project is as follows:
1. Get all data as an XML string at once
2. Load into multiple grid on the same UI
So, I used the local datatype:
datatype: 'xmlstring'
Since, the data became huge with time, the performance deteriorated. And since, there was no pagination support for local datatype, I decided to add one. I hope you find this useful and it can be easily added into jqGrid 3.6 with some simple changes. Since I did not have a chance to look at jqGrid versions post 3.4.1, I am providing the changes I made in 3.4.1 to support simple pagination that worked for me.
Here are the changes I made (highlighted in bold):
1. Added, following grid parameters to each grid where pagination was to be supported:
2. Updated function addXmlData in grid.base.js
var addXmlData = function addXmlData (xml,t, rcnt) {
if(xml) { var fpos = ts.p.treeANode || 0; rcnt=rcnt ||0; if(fpos===0 && rcnt===0) {$("tbody tr:gt(0)", t).remove();} } else { return; }
var v,row,gi=0,si=0,cbid,idn, getId,f=[],rd =[],cn=(ts.p.altRows === true) ? 'alt':'';
if(!ts.p.xmlReader.repeatitems) {f = reader("xml");}
if( ts.p.keyIndex===false) {
idn = ts.p.xmlReader.id;
if( idn.indexOf("[") === -1 ) {
getId = function( trow, k) {return $(idn,trow).text() || k;};
}
else {
getId = function( trow, k) {return trow.getAttribute(idn.replace(/[\\[\\]]/g,"")) || k;};
}
} else {
getId = function(trow) { return (f.length - 1 >= ts.p.keyIndex) ? $(f[ts.p.keyIndex],trow).text() : $(ts.p.xmlReader.cell+":eq("+ts.p.keyIndex+")",trow).text(); };
}
$(ts.p.xmlReader.page,xml).each(function() {ts.p.page = this.textContent || this.text ; });
$(ts.p.xmlReader.total,xml).each(function() {ts.p.lastpage = this.textContent || this.text ; } );
$(ts.p.xmlReader.records,xml).each(function() {ts.p.records = this.textContent || this.text ; } );
$(ts.p.xmlReader.userdata,xml).each(function() {ts.p.userData[this.getAttribute("name")]=this.textContent || this.text;});
$(ts.p.xmlReader.root+" "+ts.p.xmlReader.row,xml).each( function( j ) {
if(typeof ts.p.pagination != "undefined") {
if(j<ts.p.pagination.startIndex) return true;
if(j>=(ts.p.pagination.startIndex + ts.p.pagination.maxRecordsPerPage)) return false;
}
row = document.createElement("tr");
row.id = getId(this,j+1);
if(ts.p.multiselect) {
addMulti(t,row);
gi = 1;
}
if (ts.p.subGrid) {
try {$(ts).addSubGrid(t,row,gi,this);} catch (e){}
si= 1;
}
if(ts.p.xmlReader.repeatitems===true){
$(ts.p.xmlReader.cell,this).each( function (i) {
v = this.textContent || this.text;
addCell(t,row,v,i+gi+si, 'false');
rd[ts.p.colModel[i+gi+si].name] = v;
});
} else {
for(var i = 0; i < f.length;i++) {
v = $(f[i],this).text();
changed = $(f[i],this).attribute();
addCell(t, row, v , i+gi+si,changed);
rd[ts.p.colModel[i+gi+si].name] = v;
}
}
if(j%2 == 1) {row.className = cn;} $(row).addClass("jqgrow");
if( ts.p.treeGrid === true) {
try {$(ts).setTreeNode(rd,row);} catch (e) {}
}
if(typeof ts.p.pagination != "undefined") {
$(ts.rows[Math.abs(ts.p.pagination.startIndex - j)+fpos+rcnt]).after(row);
} else {
$(ts.rows[(j)+fpos+rcnt]).after(row);
}
if(afterInsRow) {ts.p.afterInsertRow(row.id,rd,this);}
rd=[];
});
xml = null;
if(isSafari || isOpera) {resizeFirstRow(t,1);}
if(!ts.p.treeGrid && !ts.p.scroll) {ts.grid.bDiv.scrollTop = 0;}
endReq();
updatepager();
};
3. Added two functions in grid.custom.js
showPreviousPage: function() {
$t = this[0];
if ( !$t.grid ) { return; }
if ($t.p.pagination.startIndex >= $t.p.pagination.maxRecordsPerPage) {
$t.p.pagination.startIndex = $t.p.pagination.startIndex - $t.p.pagination.maxRecordsPerPage;
}
else {
$t.p.pagination.startIndex = 0;
}
$($t).trigger('reloadGrid');
},
showNextPage: function() {
$t = this[0];
if ( !$t.grid ) { return; }
$t.p.pagination.startIndex = $t.p.pagination.startIndex + $t.p.pagination.maxRecordsPerPage;
$($t).trigger('reloadGrid');
}
4. Added the following to show pagination controls for each grid.
$("#t_SampleGrid").append("<input type='image' id='showPreviousPage' src='off-prev.gif' title='Previous' onClick= 'jQuery(\\"#SampleGrid\\").showPreviousPage();'>");
$("#t_SampleGrid").append("<input type='image' id='showNextPage' src='off-next.gif' title='Next' onClick= 'jQuery(\\"#SampleGrid\\").showNextPage();'>");
Regards
Sumit Arora
02:45
Moderators
30/10/2007
Hello
@Sumit Arora - Thank you very much. This work will be in the future 3.7 release. Of course we should adapt it to all datatypes.
@jayarjo - I think yes, we can drag a row to where we want. The method is fully customizable and uses jQuery UI widges draggable and droppable, so you can change all these parameters to meet your needs.
@Adrian - check your configuration and code again. The entrie demo for 3.6 works with the new API.
@jmav - the sample is in the demo and today I will update all the needed demo files, so you can use the method.
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:26
I downloaded jqGrid 3.6 beta and trying it on simple example
but it dosen't works
i have this error $.jgrid.format is not a function
this is my code:
jQuery("#newapi").jqGrid({
url:"/resources/res_data/profession",
mtype: 'POST',
datatype: "json",
colNames:['Ðаименование', 'Код'],
colModel :[
{name:'name', index:'name', width:110},
{name:'code',index:'code',width:110}
],
rowNum:10,
rowList:[10,20,30],
pager: '#pnewapi',
sortname: 'name',
viewrecords: true,
sortorder: "desc",
caption:"New API Example" });
jQuery("#newapi").jqGrid('navGrid','#pnewapi',{edit:false,add:false,del:false});
I using FF 3.5 on Ubuntu 9.10
Please tell me, what wrong hear
14:16
Moderators
30/10/2007
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.
17:38
16/10/2009
If you want to download latest jQgrid with all fixes use url:
18:44
Used the load on scroll feature with 50,000 records, it's great Mark. The only anomoly I came across wa son IE7 and it was intermittent, you get the odd blank grid now and again after it says loading, but after you click on the top or bottom buttons of the scrollbar the page appears...so it has loaded the data.
I moved my project from Access to MySQL to use the LIMIT function as this project will probably goto 200,000 records, so the load while scrolling feature is superb as I did not want to use the pagination.
I am using it in conjunction with auto searchiing, filtering the grid as a user keys in a search term. Works excellent! so fast!
Keep up the good work.
Regards
Mark C.
14:20
24/09/2009
Been testing the scroll feature like crazy on my test site. It's pretty fantastic.
I have, however, found some quirks in certain situations:
1. variable row sizes (scrolling near the bottom gets really screwy)
2. changing the height of the table itself (lots of things go nuts).
I have my grid setup to match the size of the page; here's my code for that:
var minheight = 300, minwidth = 800, mygrid = 'my_grid_id', gridobj = $('#' + mygrid);
// may need to subtract sidebar width, if applicable
var width = $(window).width() – 20;
if (width < minwidth) {
width = minwidth;
}
gridobj.setGridWidth(width);
if($(”#gbox_” + mygrid).position().top > $(window).scrollTop()) {
var height = $(window).height() – $(window).scrollTop() – $(”#gbox_” + mygrid).position().top – 120;
if (height < minheight) {
height = minheight;
}
gridobj.setGridHeight(height);
}
}).trigger('resize');
19:13
Loading whilst scrolling - Came across a more serious problem: IE7 and FF3
The grid is sometimes letting me multiselect rows, it then gives me an error when i doubleclick a row whilst 2 or more are highlighted or once i get the error just double clicking any cell then throws the eroor, I use doubleclick to obtain a pdf and show it in a seprate window, the pdf name is built from the data in the selected row.
$t.p.colModel[...]name' is null or not an object
It seems to lose its rowid maybe?
Regards
Mark C
Most Users Ever Online: 715
Currently Online:
30 Guest(s)
Currently Browsing this Page:
2 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