?
Solved

dynamic table creation

Posted on 2011-03-07
2
Medium Priority
?
365 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
Suggested Courses

765 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