Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

dynamic table creation

Posted on 2011-03-07
2
Medium Priority
?
369 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
SRigney earned 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
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…

610 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