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
This topic is locked No permission to create posts
sp_Feed Topic RSS sp_TopicIcon
jqGrid 3.6 beta
23/10/2009
09:52
Avatar
Pete
Member
Members
Forum Posts: 100
Member Since:
01/09/2008
sp_UserOfflineSmall Offline

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

23/10/2009
10:39
Avatar
Michael Greene
Guest
Guests

git clone

 was the correct command, but after you've cloned the repository this way, you should

git branch jqgrid36

to switch to the 3.6 branch

23/10/2009
14:25
Avatar
fuhrysteve
Member
Members
Forum Posts: 12
Member Since:
24/09/2009
sp_UserOfflineSmall Offline

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:

var childern

should probably be:

var children

at this location:

http://github.com/tonytomov/jq.....id.js#L142

This is misspelled on lines 142, 144, 157, & 158

23/10/2009
15:10
Avatar
Pete
Member
Members
Forum Posts: 100
Member Since:
01/09/2008
sp_UserOfflineSmall Offline

Michael Greene said:

git clone

 was the correct command, but after you've cloned the repository this way, you should

git branch jqgrid36

to 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

23/10/2009
16:53
Avatar
markw65
Member
Members
Forum Posts: 179
Member Since:
30/07/2009
sp_UserOfflineSmall Offline

Hi pete,

After the clone try this:

git checkout -b jqgrid36 origin/jqgrid36

git pull origin jqgrid36

After that, whenever you want to get the latest, just repeat the pull command.

Mark

24/10/2009
15:58
Avatar
Pete
Member
Members
Forum Posts: 100
Member Since:
01/09/2008
sp_UserOfflineSmall Offline

Thanks Mark

The key was changing to the jqgrid folder after the clone but before running your two commands.  Once I did that it seemed to work.  I see the 3.6 versioning in grid.base.js now.

Pete

26/10/2009
02:15
Avatar
jayarjo
Member
Members
Forum Posts: 17
Member Since:
20/10/2009
sp_UserOfflineSmall Offline

Is it possible to drag rows to a connected div, instead of table?

26/10/2009
10:23
Avatar
Adrian
Guest
Guests

Hy, I'm using the custom search module. With the new api I set it ike this 

jQuery("#grid").jqGrid('filterGrid',"#search",{
            gridModel:true,
            autosearch:true
        });

the error that commes is: "Could not get grid colModel". Can you confirme that is a bug? when will be the next stable release?

26/10/2009
15:26
Avatar
Ed Valentine
Member
Members
Forum Posts: 32
Member Since:
23/10/2009
sp_UserOfflineSmall Offline

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?

27/10/2009
10:56
Avatar
Sumit Arora
Guest
Guests

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:

pagination: {startIndex: 0, maxRecordsPerPage: 10}

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

28/10/2009
06:39
Avatar
csitol
NC
Member
Members
Forum Posts: 13
Member Since:
02/08/2009
sp_UserOfflineSmall Offline

Resize Grid!!!!

Thank you, thank you, thank you!!!

Yes, I know we could've written it ourselves, but for someone who's new to the plug-in this is a great help!  Excellent addition to jQuery.  Thank you so much for your work in making our lives much easier!

Phil Mickelson

28/10/2009
06:52
Avatar
jmav
Member
Members
Forum Posts: 34
Member Since:
16/10/2009
sp_UserOfflineSmall Offline

Can we get sample of Resize function,

29/10/2009
02:45
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

29/10/2009
11:26
Avatar
Boris
Guest
Guests

I downloaded jqGrid 3.6 beta and trying it on simple example

but it dosen't worksFrown

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

29/10/2009
14:16
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

29/10/2009
17:38
Avatar
jmav
Member
Members
Forum Posts: 34
Member Since:
16/10/2009
sp_UserOfflineSmall Offline

If you want to download latest jQgrid with all fixes use url:

http://github.com/tonytomov/jq.....s/jqgrid36

29/10/2009
18:44
Avatar
Mark C
Guest
Guests

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.

30/10/2009
14:20
Avatar
fuhrysteve
Member
Members
Forum Posts: 12
Member Since:
24/09/2009
sp_UserOfflineSmall Offline

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:

$(window).bind('resize', function() {
    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');

30/10/2009
18:57
Avatar
Mark C
Guest
Guests

Just some feedback on the loading while scrolling, sometimes the grid loses it's select highllighted row.

The functions click and double click still fire, just on a single click the row usually highlights with the themed color, but it loses it intermittently.

Just one to check

Regards

Mark C.

30/10/2009
19:13
Avatar
Mark C
Guest
Guests

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

This topic is locked No permission to create posts
Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information