开发者

jqgrid - editing a newly added row

开发者 https://www.devze.com 2023-04-05 14:00 出处:网络
When a new record is added via a form add, and the DB has a sequential key, the value for the id of the new record is not correct in the row that is auto populated in the grid. Is there a way to make

When a new record is added via a form add, and the DB has a sequential key, the value for the id of the new record is not correct in the row that is auto populated in the grid. Is there a way to make jquery get the actual new id of the grid from the db, and populate this correctly in the new row without reloading开发者_如何转开发 the gird?


Sure; have the form add return the new ID/record via JSON. Take that ID and data, construct the new HTML accordingly, and append the new row to the end of the table.

0

精彩评论

暂无评论...
验证码 换一张
取 消