Solved

dynamic table creation

Posted on 2011-03-07
2
360 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 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

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
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…

724 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