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
sp_Feed Topic RSS sp_TopicIcon
Missing example on demo page - scrolling load data
06/10/2009
04:32
Avatar
Toccamonium
Member
Members
Forum Posts: 3
Member Since:
06/10/2009
sp_UserOfflineSmall Offline

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

06/10/2009
05:40
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

08/10/2009
03:18
Avatar
Toccamonium
Member
Members
Forum Posts: 3
Member Since:
06/10/2009
sp_UserOfflineSmall Offline

Sounds great. Unfortunately we have to start soon with our new project,

so I have to look for another grid, which already fullfill this task.

Nevertheless I will watch your grid development because it saves extra

code against using another framework beside jQuery.

thx

11/10/2009
10:32
Avatar
Toccamonium
Member
Members
Forum Posts: 3
Member Since:
06/10/2009
sp_UserOfflineSmall Offline

Would be cool, if you could add 2 buttons at the tree grid demo for inserting an new

row at the same level and a button to add a new row one level above. I need a grid

for categories where customers can easily add new rows on different levels, insert

data at once and save everything Cool

11/10/2009
12:07
Avatar
markw65
Member
Members
Forum Posts: 179
Member Since:
30/07/2009
sp_UserOfflineSmall Offline

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

12/10/2009
06:48
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

12/10/2009
09:32
Avatar
markw65
Member
Members
Forum Posts: 179
Member Since:
30/07/2009
sp_UserOfflineSmall Offline

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

12/10/2009
10:13
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Mark,

I really missed to check with scroll=1. Must shame, instead that is written by you so clear. Confused

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.

12/10/2009
11:46
Avatar
markw65
Member
Members
Forum Posts: 179
Member Since:
30/07/2009
sp_UserOfflineSmall Offline

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/10/2009
12:04
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

Forum Timezone: Europe/Sofia

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

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information