开发者

Are there any simple javascript spreadsheet widgets? [closed]

开发者 https://www.devze.com 2023-02-17 18:41 出处:网络
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation that is not generally applic
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. 开发者_开发知识库For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

I need to create a simple web-based expense calculator. We're using asp.net web forms, and each cell will be a text box. The goal is to persist each value (but not the totals) to a database - so I'll have an expense table, and an expense_day table which will have the values for each row of text boxes.

There will be a week's worth of rows, and 6-8 columns. Each row needs to be totaled up, as does each column.

Is there a simple javascript framework that will do this? We're already using jquery, but I don't mind including another small specialized library if it will make this functionality easy.

Update:

Something like the solution described in this question expanded to also total columns would be ideal.


Have a look at this jQuery spreadsheet.

It looks like it uses Themeroller, which is pretty neat.


You could start with DataTables, and then use its API to add a row containing the totals.


This is probably still more complex than you need, but the ExtJS data grids could do what you want:

Here is a demo using their editable data grid (doesn't calculate totals): http://dev.sencha.com/deploy/dev/examples/grid/edit-grid.html

Here is a demo that calculates totals at the bottom. (It's also demonstrating grouping, which you can probably ignore): http://dev.sencha.com/deploy/dev/examples/grid/totals.html

You can see the rest of their samples here: http://www.sencha.com/products/extjs/examples/#sample-3

They have screencasts showing how to use their grid controls: http://www.sencha.com/learn/Screencasts

0

精彩评论

暂无评论...
验证码 换一张
取 消