问题描述
我需要为具有特定组ID的列设置自动生成的网格单元格背景.每组中的列数是动态的.如果单元格值小于或等于10,则需要设置单元格 特定颜色的背景.对于该问题,我可能不会在后面使用代码.
I need to set the auto generated grid cell background for columns with a certain group ID. The number of columns in each group are dynamic.If the cell value is less than or equal to 10 i need to set the cell background to a particular color. I may not use code behind for this issue.
推荐答案
当您使用自动生成时,会触发一个事件,您可以触发该事件来修改为该列(数据项)创建的网格单元. 这需要后面的代码.
When you use autogenerate there is an event that triggers that you can handle to modify the grid cells that are created for that column (data item). That needs code behind.
要执行触发器,您可以使用一个恒定值,但小于或等于所需代码,因此没有后面的代码很幸运.
To do a trigger you can use a constant value but less than or equal to needs code so without code behind you are out of luck.
这篇关于设置自动生成的网格列的单元格背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!