Flex Spark datagrid - 禁用行选择
我想禁用(并且看起来禁用)spark 数据网格中的某些行。我找到了这个答案来停止选择,这很棒 在flex中,有没有一种方法可以捕获并选择性地取消DataGrid中的行选择事件?
但我还想表明特定行是不可选择的。理想情况下,我想要某种覆盖,但我不确定这是否可能。我的替代解决方案是将不可选择的行的文本颜色更改为灰色。查看数据网格渲染,它们似乎都是基于列的。我研究了潜在的蒙皮(覆盖交替颜色属性),但这只是设置背景属性而不是文本颜色。这可能吗?
谢谢
I want to disable (and look disabled) some rows in a spark datagrid. I found this answer to stop selection which is great
In flex, is there a way to capture and optionally cancel a row selection event in a DataGrid?
But I want in addition to show that the particular row is not selectable. Ideally I want to have some sort of overlay but I am not sure if that is possible. My alternative solution is to change the text color to grey for the unselectable row. Looking at the datagrid renders they all seem to be column based. I looked at skinning potentially (overriding the alternating color property) but this just sets the background property and not the text color. Is this possible?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最基本的解决方案是使用您提到的自定义渲染器和选择阻止逻辑:
DataGridRowDisabling.mxml
GridItemRenderer2.mxml
Product.as
The most basic solution is using the custom renderer and selection preventing logic you've mentioned:
DataGridRowDisabling.mxml
GridItemRenderer2.mxml
Product.as