我是一名编程新手,我想通过包含“if-else条件”来管理我的复选框。例如,我的网格中有两列名为“可读”和“可写”(公共布尔值)。我将使用CheckBox来表示这两列。
1) 如果可读/可写的值为false,则该复选框将是“只读”的。
2) 如果可读/可写的值为true,则用户可以编辑该复选框。
例如,我要如何从下面的代码中进行编辑?(假设已完成数据绑定)
<sf:GridTreeColumn MappingName="Readable" PercentWidth="2">
<sf:GridTreeColumn.StyleInfo>
<sf:GridStyleInfo CellType="CheckBox" HorizontalAlignment="Center" IsThreeState="False"/>
</sf:GridTreeColumn.StyleInfo>
</sf:GridTreeColumn>
<sf:GridTreeColumn MappingName="Writable" PercentWidth="2">
<sf:GridTreeColumn.StyleInfo>
<sf:GridStyleInfo CellType="CheckBox" HorizontalAlignment="Center" IsThreeState="False"/>
</sf:GridTreeColumn.StyleInfo>
</sf:GridTreeColumn>
诚挚感谢所有尝试阅读我的问题并帮助我的人。=)