girish_327
Posts: 108
|
| Posted: 12/25/2007, 9:22 PM |
|
Hello All,
Wish you All a Very Merry Christmas & Happy New Year.
I would like to create a dynamic Grid which show Columns & Rows Dynamically.
Where user can add new Columns to Grid Dynamically and easily add the data in to that.
For Example Below is My Table Cloumns Strcuture
Mill Name | 10s | 12s | 14s | 16s | 20s | 2/30 | 40s | N...
Please HELP Me How to create this Kind of Grid.
Thank YOU...
_________________
Girish Baraskar
Web Designer/Developer
http://www.agnisdesigners.com
http://www.eindianpaintings.com
http://www.realestatekolhapur.com |
 |
 |
magus
Posts: 98
|
| Posted: 01/08/2008, 2:07 AM |
|
Hello Girish,
Happy New Year.
I looked at various ajax libraries/modules but didn't see any that will add rows and columns for editing. You may have to write this code yourself.
If I had to create an editable grid as you describe then I would look at using the prototype library to handle adding columns to the table by writing to the DOM. http://prototypejs.org/
I would have the script save a columns state variable so the server is aware of any new columns when the form is returned.
Then I would use Row update / insert events to manually process the returned data.
It is possible to use the Before Build event to add new update fields that will be built into the query. for example:
$req_details->ds->UpdateFields["filled_date"]["Name"] = 'filled_date';
$req_details->ds->UpdateFields["filled_date"]["Value"] = date('Y-m-d H:i:s');
$req_details->ds->UpdateFields["filled_date"]["DataType"] = 4;
So if you are inserting/updating your extra columns into the same table as the main query then you could use this code to include them.
Otherwise, if you are saving the extra columns into other related tables you would run a separate query for each row, probably after a successful insert or update.
I hope this provides some assistance.
Regards,
Don Anderson
|
 |
 |
|