0

Grid live data on client side row are empty after 20 row index

asked 2010-03-21 15:42:22 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

Hi,

I'm developing a client side calculation on the grid component. But when the grid has more than 20 rows, after the 20, RowIterator returns the Row object, it's not null, but it says it has only one child, but the grid has 6 columns, and are visible on the browser.

I've tried setting preloadSize (on server), rerendering the row (on client) renderAll (on server), and now I've got no clue how to make this works.

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2010-03-21 16:04:16 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

Ok,

I got it. It's a execution sequence mistake. The execution sequence is:

1. AfterCompose on composer
2. Data binding model="composer.listMethod"
3. Grid onCreate method.

Apparently setting preloadSize has no effect on client side. Calling grid.renderAll() on 2 also has no effect (after setting the model). Calling renderAll() on 3 solved.

link publish delete flag offensive edit

answered 2010-03-21 16:07:50 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

Now, to the next problem,

The above situation only works when 1st drawing the page. If I trigger a update on the grid model (let's say by a button), then I don't have the grid.onCreate event anymore, and I can't imagine any other event so I can call grid.renderAll() and make this work.

Any tips on this?

Thanks,
Madruga

link publish delete flag offensive edit

answered 2010-03-21 20:30:50 +0800

samchuang gravatar image samchuang
4084 4

Hi

I have a small question, why do you need to know how many columns inside a row?

I am thinking the problem you mention, because the row is not visible to user, so, it doesn't have child components

so how about make the row object to visible first? does this behavior is has side effect to you ??

link publish delete flag offensive edit

answered 2010-03-21 21:33:29 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

updated 2010-03-21 22:12:32 +0800

Hi Sam,

Thanks for the quick reply.

Well, the basic idea is that I'm calculating the total value, that's why I need to iterate on every row. (and it recalculates on every onChange event form a lot of components inside the grid)

I've checked if was the visible problem, that's why I setted preloadSize to the same amount of rows that will be generated (29). I also checked the _visibleItemCount on Rows.js, it had 29 on it. I even made a test changing my browser screen size, to show all the itens in the browser without scrooling, and still, 21~29 rows were empty. With "empty" I mean that the Row widget is not null but has only one child (should have 6), but the HTML is displayed with the correct data (all 6 columns populated), quite strange huh?!

Could be a bug?


I believe that's because data binder is on the way, if I could force a grid.renderAll() after the data binder setted up the rows, would probably solve this issue.

link publish delete flag offensive edit

answered 2010-03-22 08:02:29 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

updated 2010-03-22 09:29:24 +0800

Hi,

It definitely has something to do with data binding. I've switched the impl from databind to RowRenderer.

updating the model with setModel() has the same behaviour, 21~29 Row Widget is empty.
But then calling grid.renderAll() forces the render on all rows, then it work as expected.

For now I'll go with RowRenderer, but it would be nice if we could force a renderAll after data binder has done it's magic.

Kind regards,
Madruga

link publish delete flag offensive edit

answered 2010-03-22 19:49:32 +0800

samchuang gravatar image samchuang
4084 4

Hi

glad to hear you have solve the problem. By the way, you could post the bug about data binding to here

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-03-21 15:42:22 +0800

Seen: 755 times

Last updated: Mar 22 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More