简体   繁体   English

EditableGrid仅编辑第一行

[英]EditableGrid Only editing top line

I am using EditableGrid ( http://www.editablegrid.net/ ) Which creates some nice looking tables, however every time I try to edit any row other than the first it pulls the first row data into the row. 我正在使用EditableGrid( http://www.editablegrid.net/ ),它创建了一些漂亮的表,但是每次我尝试编辑除第一行以外的任何行时,它都会将第一行数据提取到该行中。

Here is an example of what is happening: 这是发生的情况的示例:

https://mylinguistica.com/Documentation/editablegrid-mysql-example/ https://mylinguistica.com/Documentation/editablegrid-mysql-example/

I am using the example code found here: 我正在使用此处找到的示例代码:

http://www.editablegrid.net/en/faq http://www.editablegrid.net/en/faq

And otherwise everything is working great. 否则一切都很好。 Any Idea what could be causing this? 任何想法可能是什么原因造成的?

I had the same issue but found the solution. 我遇到了同样的问题,但是找到了解决方案。 My data from the server was using a hardcoded "id" of 1 for every row/record. 我来自服务器的数据对每行/记录都使用1的硬编码“ id”。 Once I changed it to increment, everything worked as expected. 一旦将其更改为增量,一切都会按预期进行。 I suspect since your problem sounds exactly the same that you had the same issue. 我怀疑,因为您的问题听起来和您遇到的问题完全一样。 You've probably figured it out by now but hopefully this answer will help somebody else. 您可能已经知道了,但是希望这个答案可以对其他人有所帮助。

{"id":1, "values":{"country":"uk","age":33,"name":"Duke","firstname":"Patience","height":1.842,"email":"patience.duke@gmail.com","lastvisit":"11\/12\/2002"}},
{"id":2, "values":["Rogers","Denise",59,1.627,"us","rogers.d@gmail.com","","07\/05\/2003"]},

https://github.com/webismymind/editablegrid/blob/master/examples/json/grid.json https://github.com/webismymind/editablegrid/blob/master/examples/json/grid.json

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM