FineUI 官方论坛

标题: grid .DataIDField(“”) 绑定的字段为int64 时值错误 [打印本页]

作者: allnetliuxin    时间: 2018-3-14 17:17
标题: grid .DataIDField(“”) 绑定的字段为int64 时值错误
你好发现个问题,当grid .DataIDField("LogId") 绑定的 字段 LogId 为 int64 时,grid 的 id 值就和数据库的值不一致了
[attach]11060[/attach]
[attach]11061[/attach]

[attach]11062[/attach]

[attach]11063[/attach]

回调时返回的值
F.ui.GridDatas.loadData([[33590000000010102,"1aa5f97f-8a58-4f30-9754-4b65d9de9522","The primary key 'DictItemId' could not be null.","2018-03-14T07:39:14Z","Ajax"],[11,"fa5e7d9d-f43a-44eb-bca1-57a97f3fbf1b","The primary key 'LogId' could not be null.","2018-03-14T06:44:15Z","Ajax"],[1,"dedb0879-b20a-4b5d-8967-4028af1fbb86","The primary key 'LogId' could not be null.","2018-03-14T06:41:45Z","Ajax"]]);



作者: sanshi    时间: 2018-3-15 09:09
这个问题我已经在群里回复过了,是JS的精度问题。由于渲染到客户端JS,这个数据是以整型的方式呈现,所以出现精度丢失问题。
目前的解决办法是,新增一个类型为字符串的ID列。



[attach]11064[/attach]






欢迎光临 FineUI 官方论坛 (https://www.fineui.com/bbs/) Powered by Discuz! X3.4