How to properly use formatter and editor in Slickgrid

两盒软妹~` 提交于 2019-12-24 14:34:07

问题


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.

The Problem:

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?


回答1:


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

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.



来源:https://stackoverflow.com/questions/35358532/how-to-properly-use-formatter-and-editor-in-slickgrid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!