Bouilleoliv / flexigrid

Automatically exported from code.google.com/p/flexigrid
0 stars 0 forks source link

Fix/hack for accumulation of dynamic data #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hey all,
Had a specific use case for flexigrid... I was adding data to the table, but 
this data was randomly generated (and thus not available all at once for easy 
ajax loading). 

So I just did a quick mod to allow a parameter (data.keepold, boolean) to be 
passed that, if set, stops re-creation of the table and keeps all old data. 
This allows gradual accumulation of data through client-side javascript.

Hope this proves useful to someone.
Cheers!

Original issue reported on code.google.com by smartin...@gmail.com on 26 Jun 2011 at 3:47

Attachments:

GoogleCodeExporter commented 8 years ago
What about pager: pages, total?
I see a complete disruption.

Original comment by ymkin....@gmail.com on 2 Jul 2011 at 9:42

GoogleCodeExporter commented 8 years ago
Ahh, I see your point. 

In my case I didn't have to deal with pagination, since all my data fits fine 
on a single table. Is there a better alternative to what I'm doing, aside from 
keeping all data in a separate array or object and displaying chunks of it at a 
time with flexAddData? 

Original comment by smartin...@gmail.com on 2 Jul 2011 at 1:24

GoogleCodeExporter commented 8 years ago
Let's look at the specifics of accumulate data on server or client side.
When table grows up the pager is very useful. Pager is a key flexigrid feature.
Data accumulation on the client side raises many questions such as:
What to do when a network error?
I would prefer the data accumulation on the server side.
If it does not bother you, store data in a variable, check the onSubmit to not 
lose the accumulated data.

I close this issue. Good luck!

Original comment by ymkin....@gmail.com on 4 Jul 2011 at 3:27