Solved

dynamic table creation

Posted on 2011-03-07
2
352 Views
Last Modified: 2012-05-11
Hi

Im trying to create a form and a data grid, which submitted data add to row and then call ajax function and save record to database

i need to add edit delete button to the row and also need to get id of the record to call specific row update , delete

problem is what is the best way to get record id when adding row to the table?


Regards



0
Comment
Question by:3xtr3m3d
2 Comments
 
LVL 15

Accepted Solution

by:
SRigney earned 500 total points
ID: 35059348
I think jQgrid will give you everything that you need for working with a table dynamically. http://trirand.com/blog/jqgrid/jqgrid.html

When I do similar things I have my Ajax call return the id that was added to the database and I update that row with the id.   I use a negative number to hold it's place. I start at -1 and count backwards for each one that I use to keep the row uniquely identified.
0
 
LVL 3

Author Comment

by:3xtr3m3d
ID: 35059760
Thanks for the information. im gona build a system for a book store and seems jqgrid can handle most its functions.

i also did that by generating unique id and save with that id so newly created button knows the id and can call query with that id.


Thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now