Forum
04:32
06/10/2009
Hi,
According to the forum this issue has been already discussed.
It would be nice to have this kind of example on the demo page,
as it is a common solution if you have many many records.
Here is an example of Ext.JS Livegrid: http://www.ext-livegrid.com/demo/
They have 5000 data records and they only load those data into the grid
depending on the scrollbar + a few rows in advance.
@Tony: Would you be so nice, if this kind of technich is really available to
add this onto the example page? Thanks indeed.
Cheers
TC
05:40
Moderators
30/10/2007
Hello,
Since this is requested many times - the plan is to have this in 3.7 release.
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.
12:07
30/07/2009
Since this is requested many times – the plan is to have this in 3.7 release.
Tony,
Ive been working on this for my project... I just pushed the current implementation to markw65/jqGrid.
Basically, it extends the behavior of the existing "scroll" option:
- when scroll is true-ish, the scroll bar reflects the total number of elements, not the number loaded into the grid.
- when scroll === true, the grid will always hold all the items from the start through to the latest point ever visited (this is basically the old behavior, except for the scrollbar, and some other small fixes).
- when scroll is set to any other true-ish value (eg 1), the grid will just hold the visible lines, similar to the demo mentioned above.
I've made an optional extension to the server protocol: if you set the npage option in prmNames, then the grid will sometimes request more than one page at a time, using this parameter (if you /dont/ set it, it will just perform multiple gets).
Mark
06:48
Moderators
30/10/2007
Mark,
As usual very good work.
I'm littlе divided about what to do.
Let me tell my idea (it is not a new one).
In this case may plan is to have a div and wrapper which should act as vertical scrollbar. The hight of the inner div can be calculated depending on the total rows and the height of the outer div should have the height of the grid . This way it will be easy for me to support RTL in all browsers, since not all (like Chrome and Safari support left scroll bar when we have RTL).
But the more common problem IMHO is when we have a relative big data - 10000-15000 rows- the rows still remain into the DOM
(You can just test this if you go into the demo New in 3.5 -> Grid View mode. Set this to have scroll to true and go to the last page - mybrowser tell me that there is not enoght memory)
I think that we should make this with inteligent rows (page) swaper requesting pages forward and backward, having a relative little data into the DOM.
What do you think about this?
Thank you very much again
Tony.
P.S. By the way there is a bug in addXMLData - you forgot to add a adjust parameter.
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
Hi Tony,
Thanks – I'll fix the addXMLData parameter.
I think the changes you suggest to enable you to explicitly position the scroll bar should be pretty easy to add on top of my changes.
If you set scroll=1 (rather than true), then it already swaps rows in and out to keep just the needed rows in the DOM. Grab the scrollbar, and scroll down. The display in bottom right will show you “view – 5301-5330 of 15000″ for example.
The algorithm right now is: if more rows are needed at the bottom of the grid, but some of the loaded rows are visible, then append some pages. Otherwise, empty the grid, and just fetch enough pages to cover the visible region.
So, if you scroll down slowly enough, you /can/ get all the rows in the DOM, even with scroll=1. But generally, that wont happen (I've been using this for a few days in my own grid). I should probably tweak the algorithm to additionally throw away rows when you go over some specified threshold.
Also, scrolling backwards is less efficient than scrolling forwards, because it always fetches everything it needs. I need to make some changes to addXmlData and addJSONData to handle inserting new rows ahead of existing ones…
Mark
10:13
Moderators
30/10/2007
Mark,
I really missed to check with scroll=1. Must shame, instead that is written by you so clear.
It is going good for now. I will make tests for this, since I need this too.
Now I will go to look deep into what you have do.
Also some other good news – I have prepared sortableRows and drag and drop table rows between two grids (instead that jquery ui does not support this for tables) I need a more tests before pushing this into the Git.
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.
11:46
30/07/2009
Hi Tony,
No problem - the "true" vs 1 is a little odd.
My logic was that I didnt want to change the behavior of existing scroll=true grids (except to make the scrolling work better). For grids of up to a few hundred rows, its probably better to just keep everything loaded.
And also, I could use eg scroll=n to limit the number of loaded pages - I just hadnt got around to doing it.
Just curious - is your sortableRows built on top of sortable? Or is there some fundamental problem with sortable and table rows?
Mark
12:04
Moderators
30/10/2007
Mark,
Thanks.
No, sortable rows work just fine with one call to UI sortable.
The problem was for drag and drop a row from one grid to other - The jqUery UI does not accept this.
More here: http://dev.jqueryui.com/ticket/2405
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.
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