SlickGrid V2.0 拖动时列名称/id 不跟随列
我有一个应用程序(使用 SlickGrid),当用户单击单元格时,我需要随时获取列名称或 id(这会弹出一个特定于该列/单元格中的数据的菜单)。网格最初工作正常,但如果移动(拖/放)列,列名称/ID 不会跟随放置,而是保持映射到其初始列位置。
有其他人看到过这个吗?如果有,你是如何解决的?
谢谢
I have an application (using SlickGrid) where I need to get the column name or id at any time when user clicks on a cell (this pulls up a menu specific to the data in that column/cell). Grid works fine initially but if the column is moved (drag/drop), the column name/id does not follow the drop but remains mapped to it's initial column position.
Has anyone else seen this and, if so, how did you fix it?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试重用 html 代码中定义的列列表?您应该从网格中获取列列表。以下代码应该执行您所期望的操作(即打印出您单击单元格的列的名称):
您可以在源代码提供的示例之一中添加该代码(例如“example3-editing.html”) ,拖放一些列并在单击单元格后检查控制台。
Are you trying to reuse the list of columns defined in your html code? You should get the list of columns from the grid instead. The following code should do what you are expecting (i.e. printout the name of the column in which you clicked a cell):
You can add that code in one of the examples provided with the source code (say "example3-editing.html"), drag-drop some columns around and check the console after clicking on a cell.