...

View Full Version : building a cell controlled grid in JS



korssane
02-25-2012, 02:09 AM
Hi Peers,

i am trying to build a template for my work.
1- it consists of 3 rows of data pulled from a databse based on 3 parameters entered in a form.
those 2 rows includes 60 cells each ( 60 columns : 60 months)
2- i will have another 2 empty rows where i have to call another data from another table or enter it manually..
3- i ll have the last row that will hold calculation results based on the above rows..

Any idea on how to build that ?


\please let me know if you need more details or mock up .. it almost like an excel web spreadsheet except that sopme data is pulled directly from a database..


thank you

Old Pedant
02-25-2012, 03:19 AM
Well, for starters, you won't do *THIS* in JavaScript:

1- it consists of 3 rows of data pulled from a databse based on 3 parameters entered in a form.
those 2 rows includes 60 cells each ( 60 columns : 60 months)

JavaScript can't get data from a database (at least not a server-side db). So you'd presumably do that in PHP/ASP/JSP. Easier to do there, anyway.

I do have to say that I wonder about the adivisability of a single row with 60 columns. That's going to be way wider than any browser screen. You say it is 60 months: I'd break the thing up into one-year (12 month) segments. And so have 5 *GROUPS* of rows, one per year. But that's me.

Anyway, as long as you are using PHP/ASP/JSP to build those two rows, just use that same code to build blank empty cells (or cells with <input> fields) for the other rows.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum