如何正确使用格式和编辑在Slickgrid [英] How to properly use formatter and editor in Slickgrid

查看:1481
本文介绍了如何正确使用格式和编辑在Slickgrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用我们的角度指令slickgrid。
我们希望在Slickgrid的一个单元格/列使用另一个列表指令(与输入简单的选择元素)。

We are using slickgrid in our angular directive. And we would like to use another list directive (simple select element with input) in a cell/column of Slickgrid.

我想要的列表元素可见当电网可用,因此用户知道有一个列表。为此我使用的指令列表作为格式化。它的当电网呈现可见。

I want the list element to be visible when the grid is available, so user knows there is a list. Therefor I am using the list directive as formatter. It Is visible when the grid is rendered.

当点击保存列表元素的单元格,编辑器模式从来没有发射,因为列表元素点击事件。

When the cell that holds list element is clicked, the editor mode is never fired because of the list element click event.

我们认为使用该用户知道有一个清单列表的图像,并且当按下开清单。

We thought to use an image of list that user knows there is a list, and when clicked open the list.

有没有更好的办法做到这一点?

Is there a better way to do it?

推荐答案

我们已经设法得到它使用列表指令,因为我们rendere /格式化以及编辑器完成。

We have managed to get it done using list directive as our rendere/formatter as well as editor.

我们做我们的名单指令为只读,因此它不会触发Click事件。而现在人们看到,当电网呈现列表元素。而当一个人点击列表与细胞,列表会自动通过code打开。我们现在这个解决方案唯一的问题是,如何从编辑器复制所选项目到格式器(如果有谁知道,请分享)。

We made our list directive as ReadOnly so it does not fire click event. And now one sees a list element when grid is rendered. And when one clicks on the cell with list, the list is automatically opened via code. The only problem we have now with this solution is that how to copy selected Item from editor to formatter (if anyone knows, please share).

任何更好的解决办法也很欢迎。

Any better solution is also welcomed.

这篇关于如何正确使用格式和编辑在Slickgrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆