Forum
22:10
31/10/2009
Hey two questions:
- When do you think u will come out of beta? Also if you come out of beta, please post the changes between this release and the major release.
- I am trying to make a decision between this grid and http://www.platinumgrid.com/ad.....
04:41
Thanks Mark, if you could solve this it wold be great. Definately on the scroll it intermittently falls over, on sorting the columns or seraching/filtering data nothing goes wrong, it like resets itself.
I turned on multiselect to just see what happens and it works fine for row doubleClicking, I couldn't make it break.
I also did an alert on the rowID and it is also fine.
One thing i did come across (but it's just bad design and you would never do it) is if you fetch 10 rows and your grid shows 20 rows then you in effect can have duplicate rowID's 1-10 and 1-10 as our offset if rownum 10 from the database.
Keep up the good work on this feature, it is excellent.
I can show you an online demo of the problem, but i'm sure you have made it happen.
Regards
Mark C.
09:17
Another Issue.
Only Happens in IE7 i get 'Invaild Argument'. As usual IE7 is probably being overstrict with some naming convention where FF3 is letting it play.
SETUP:
v3.6beta
Scroll:1
rownum:20
gird height:458 (shows exacly 20 rows in IE)
Records: 40,512
I am using scroll with the auto search example.
When it filters down to showing 1 or 2 records it hangs on the LOADING dialog and IE7 throws the error (3 or more recorda re fine.)
I set scroll=0, do the same searching gte it to display 2 or 1 records and it works perfectly.
Mark / Tony, do you think IE7 has a problem with the naming of the scroll parameter 'scroll' as i thought that was a reserved word? Possibly when your checking if grid is empty because limit is less than rownums, but then why so specific 1 record or 2 records, but > 3 it's fine.
I did set the rownum to 19, and this time it allowed filtering down to 2 records, but when i filtered to 1 record it flagged the same error
BTW 0 records is wokring fine.
Regards
Mark C.
PS
Hows the 'losing selection' problem progressing? it is definately when a new page is fetched but intermittent and again it nesses up in firefox allowing highlighting many records but FF allows the doubleclick to happen, IE7 doesn't
16:13
Hi MarkW,
Here's some demo's with some code at bottom, enjoy!
http://www.courtnell.com/rawdemo1.html - no scrolling
http://www.courtnell.com/rawdemo2.html - scolling turned on.
Regards
MarkC
17:25
30/07/2009
The issue with -ve row numbers, and other oddities is because you're returning invalid data.
When you get down to one record, your returned data is:
<?xml version='1.0' encoding='utf-8'?>
<rows>
<page>0</page><total>0</total><records>1</records>
<row><cell
>40017998</cell><cell>31031500/001</cell><cell>AB0010005</cell></row>
</rows>
Which is wrong - page, and total should be 1.
If you filter slightly less, and get 2 rows, then page, and total are correctly reported as 1.
I havent checked, but Im pretty sure this is also the cause of the IE7 errors.
I'm mostly done with the fixes for the other issues - I'll be pusing to my fork of the grid later today.
Mark
17:51
30/07/2009
Tony: I've pushed some fixes to my fork of the grid.
Fixes for various scroll=1 issues:
- the rowheight was incorrectly calculated on IE and Chrome, resulting in some odd effects when scrolling backwards a line at a time (fixed)
- reloadGrid always reset the grid to the top-left scroll position (fixed)
- there was no way to tell reloadGrid to goto a specific page when scroll=1 was set (added an extra parameter to allow a new page to be specified, or to allow the selection to be preserved)
- editing a row with reloadAfterSubmit set would reset to the top of the grid.base.jsExtra parameters can be passed to reloadGrid as: grid.trigger("reloadGrid", [{page:5}]), to specify a new page, or grid.trigger("reloadGrid", [{current:1}]) to preserve the selection, and horizontal scroll position. By default, reloadGrid will kill the selection, scroll to the left, but preserve the vertical scroll position.
I noticed that the reload nav button already had an option to preserve the selection - but seemed to depend on the refresh occuring within 1s of triggering reloadGrid - so I rewrote that to use the above syntax.
Also, while working on this, I noticed a couple of minor issues with the grid code.
First, the grid constructor is written to create a grid for each element in the jQuery array that gets passed to it - the trouble is that they all end up sharing the same copy of "p", and "grid" - which is never going to work.
Second the constructor makes local copies of the initial values of various callbacks - so changing the value of the callback isnt going to work. In some cases it only uses the local variable to determine whether the callback should be called - and then calls the current value of the callback - which is still a problem if its been set to null...
Mark
06:26
Moderators
30/10/2007
Mark,
Thanks for the fixes.
Second the constructor makes local copies of the initial values of various callbacks – so changing the value of the callback isnt going to work. In some cases it only uses the local variable to determine whether the callback should be called – and then calls the current value of the callback – which is still a problem if its been set to null…
I'm having the same issues. I think in this case is better to use direct isFunction in place where this should be.
First, the grid constructor is written to create a grid for each element in the jQuery array that gets passed to it – the trouble is that they all end up sharing the same copy of “p”, and “grid” – which is never going to work.
You are right. I think that one possible solution is to use call or apply to this grid - i.e startDrag.call(ts,e) .... What do you think? Can you reorganize your code to this (I mean for the scroll – or I should do this?
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.
07:20
Mark, did you solve the mulit-selecting problem? I uploaded the new grid.base.js file from GIT, into
http://www.courtnell.com/rawdemo2.html (fixed the 0 page problem thanks)
Now it's not intermittent, it's everytime, is there a new parameter to set?
IE7 - Allows highlighting many rows but doesn't allow dblclick to fire...same error
FF3+ - No highlihting, but allows dblclick to fire
Regards
MarkC
09:05
Moderators
30/10/2007
Mark,
Just pushed the changes for the callbacks. I do not have tested it fully.
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.
09:14
30/07/2009
I think so. Or, if you're concerned about efficiency, just check for non-null rather than calling isFunction. That seems to be the standard way of dealing with optional callbacks throughout jQuery…
Well, I realized as I did it that I was writing more code that depended on this… but there's no real way around it until the problem of “p” and “grid” being shared is addressed.
One very simple way to fix the problem would be to rename the “p” parameter(say as pin), and then move the “var p = $.extend(…,pin)” and “var grid ={…}” inside of the “return this.each” loop. With that, I think everything continues to work with no need to rewrite any of the methods, except that now $(”#grid1,#grid2″).jqGrid(opts) does the right thing.
Fixing it that way does result in multiple copies of the grid (as in table.grid) object's functions (although, nobody can be using the grid this way right now, because it wouldnt work – and we already have one copy per grid on the page). But with a little effort we could change the grid object into a class, and have a single copy of all its methods shared by all the grids on a page.
I would be happy to make these changes. I dont think its a big deal – I've not seen anybody complain that $(”#grid1,#grid2″).jqGrid(opts) doesnt work! Its just that the code is written so that it would create two grids in that situation, but neither of them would work…
Mark
09:21
Moderators
30/10/2007
Mark,
Thanks, I will be happy if you do this. In the moment I 'm trying to prepare the new documentation and this is not trivial job
Thanks
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.
09:32
30/07/2009
tony said:
Mark,
Just pushed the changes for the callbacks. I do not have tested it fully.
Hi Tony,
There is one issue... in populate, I added a variable lc which is supposed to be either a copy of loadComplete, or a function that calls loadComplete and then fetches the next page (in scroll mode, you may need to fetch more than one page at a time).
Your rewrite breaks that, and the subsequent pages wont be fetched.
Otherwise, I see you've switched to using call for most of them, which gives them a context. I think its good to define the context they're called in - but for a few, its actually a change of context. For example:
var pd = this.postData;
09:36
Moderators
30/10/2007
Mark,
Ok - make it so that this will work with scroll. As in my prevuious post - I do not have tested it fully. With this I just want to tell you the new concept.
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.
09:52
30/07/2009
Mark C said:
Mark, did you solve the mulit-selecting problem? I uploaded the new grid.base.js file from GIT, into
I actually wasnt able to reproduce it, and assumed it was related to the loss of selection problem, which is fixed.
I just took a look at your example, and the problem is that you're not providing row-id's, so the grid is auto-generating them, and /that/ isnt working very well in scroll mode (its generating ids 1-20 over and over). I should be able to fix that - although you will probably want/need to provide ids for any serious work.
Mark
09:58
30/07/2009
tony said:
Mark,
Ok – make it so that this will work with scroll. As in my prevuious post – I do not have tested it fully. With this I just want to tell you the new concept.
Tony
Hi Tony,
I can fix the loadComplete problem... but are you planning to stick with the change to the "this" parameter? ie its going to be uniformly the dom table element, across all callbacks? I like the consistency - but Im sure there will be quite a few grids broken (although easily fixed) by that...
Mark
10:07
Moderators
30/10/2007
Mark,
Let try. The only thing here is that this should not brake the existing user code. If it is going to the change to grid code, I think I will do it.
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.
10:23
30/07/2009
Hi Tony,
Looking at this again, I dont think you document anywhere that the parameter object will be "this" inside the beforeRequest callback - I must have just got that from looking at the code.
So basically, this change /could/ break user code (it breaks mine!) but only because I've used an undocumented feature. In anycase, I should be using getGridParam, to get hold of postData - and that's even easier after this change.
Mark
Most Users Ever Online: 715
Currently Online:
31 Guest(s)
Currently Browsing this Page:
3 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