Comments (10)
Hi Paul,
I am trying to do something similar for subset of the entire table.
Lets say a table consists of (10 rows, 10 cols).
An Ajax call fetches new data for cells starting from (row 3, col 2) to (row 6, col 7).
I would like to be able to call setData as show in this example:
http://jsfiddle.net/ruvu0895/
But,specify that the data is set of cells starting from (row 3, col 2) like:
$('#my').jexcel('setData', data, 3, 2);
Is there a way to accomplish this please?
from ce.
The method insertRow can give you the option to add new row with default data. If this is not what you are looking for, you can change your data variable and call setData again without any argument, this going to refresh the data.
from ce.
i have begin to look around some method that i have not tried already
i found that if i add data programmatically, the data are removed from the row that move up
i found that setValue is working well, but i have to assign data one by one
i was wondering if there was a better way since my table have 12 columns
from ce.
The correct method is setData. Here is one example of updating the entire table data and one loading remote data via a CSV file.
http://jsfiddle.net/rzr3gL8c/
http://jsfiddle.net/ruvu0895/
from ce.
I have checked and the website seems to be OK. Could you let me know which link you are trying to access?
from ce.
the setData should be use to reload some data into an existing jExcel table.
from ce.
i keep on getting the Cannot set property 'data' of undefined
same spot in the jquery.jexcel.js
i have fellowed the fiddle and i keep getting the error
here is how i proceed, maybe i missed something and you will be able to point it out
i use the onchange event of the jexcel creation on a div
in the function referenced by the onchange event i have an ajax that go pump data from my database
on success, i call a function to import those data to a multidimension array
after that, in the same function, i call $("#datagridContent").jexcel("setData", arrayItem);
for some reason i keep getting the same error
i even created an array with only simple string and keep getting that error
i continue to dig on my side
thank you again for your time
from ce.
i found some reasons to some of my troubles
when you want to setData from the onchange, you must use the object pass in parameter (lesson learn)
second, my trouble is apparent when you copy paste data in the cell
when you copy paste the object pass is the cell, when you manually write data, the object pass is the table
whatever the way you are doing it, the moment you copy paste, the onchange event fire and the cell is pass instead of the table
i will take a look in the script to try to found the problem, i will keep you posted
Edit:
found the problem (if its a problem)
the paste function pass the cell to setValue
the setValue call onchange(
would it be a good idea to always pass object, cell, value instead of caller, cell value?
from ce.
from ce.
i have fixed my problem by getting the object by my own method instead on relaying on the jexcel to pass me the right object
from ce.
Related Issues (20)
- updateTable method is very slow on Chrome HOT 2
- Nodejs support
- Docs: `defaultRowHeight` is missing
- update source in a specific cell HOT 1
- HTML column editor is too short for toolbar;
- Compatibility of jspreadsheet-ce v4.13.4 with Nuxt 3 HOT 4
- Custom-Editor: minor request + revisit old bug
- Formula automatic updates range but not the result value HOT 1
- Mask price with all symbol HOT 1
- Row Add + Column Delete + Undo/Redo Breaks Row
- Update instructions for installating from CDN
- Docs: Description of event arguments missing HOT 1
- Dropdown data refresh HOT 1
- ContextMenu
- Identifier "val" has already been declared HOT 2
- Mouse Scroll then move Horizontal Scrollbar causes jump to start
- RTL problem
- Feature Request: Allow different white-space and other style properties per column
- Get both value and formula HOT 1
- Intermittent error in cross-sheet calculations HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ce.