slickgrid 中可编辑和不可编辑的行

发布于 2024-10-07 20:06:48 字数 38 浏览 0 评论 0原文

如何在 slickgrid 中使某些行可编辑而某些行不可编辑?

How do I make some rows editable and some rows non-editable in slickgrid?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夜清冷一曲。 2024-10-14 20:06:48

设置 onBeforeEditCell 事件处理程序并返回 false 以防止单元格进入编辑模式。

Set the onBeforeEditCell event handler and return false to prevent the cell from going into edit mode.

任性一次 2024-10-14 20:06:48

或者您可以简单地指定某些列不可编辑,而不指定任何编辑器属性。

Ex

columns = [
    {id:"id",name:"#",field:"id"},
    {id:"editable",name:"clicky",field:"editable",editor:Slick.Editors.Text}
];

取决于您是否要循环辅助数组并应用 if 条件。

希望有帮助

Or you can simply designate some columns not to be editable without specifying any editor attribute.

Ex

columns = [
    {id:"id",name:"#",field:"id"},
    {id:"editable",name:"clicky",field:"editable",editor:Slick.Editors.Text}
];

Depends if you want to loop an auxiliary array and apply if criteria.

Hope it helps

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文