C# DevExpress-对选定单元格应用相同的条件格式
是否有一种方法可以将相同的格式规则应用于多个表格单元格(设置为false可见),而无需指定特定字段。只是以某种方式计算当前表单元格的Eval()值,并相应地应用格式。例如,仅使用一条规则隐藏报表上所有零值([]==0)的数字单元格:) 到目前为止的解决方案-C# DevExpress-对选定单元格应用相同的条件格式,c#,devexpress,report,reporting,C#,Devexpress,Report,Reporting,是否有一种方法可以将相同的格式规则应用于多个表格单元格(设置为false可见),而无需指定特定字段。只是以某种方式计算当前表单元格的Eval()值,并相应地应用格式。例如,仅使用一条规则隐藏报表上所有零值([]==0)的数字单元格:) 到目前为止的解决方案- private const string ZeroValue = "0,00"; public FISaldoAccountReport() { InitializeComponent();
private const string ZeroValue = "0,00";
public FISaldoAccountReport()
{
InitializeComponent();
RegisterEvents();
}
private void RegisterEvents()
{
positionAmountDebitCell.BeforePrint += NumCellBeforePrint;
positionAmountCreditCell.BeforePrint += NumCellBeforePrint;
positionSaldoCell.BeforePrint += NumCellBeforePrint;
partnerAmountDebitCell.BeforePrint += NumCellBeforePrint;
partnerAmountCreditCell.BeforePrint += NumCellBeforePrint;
partnerSaldoCell.BeforePrint += NumCellBeforePrint;
accountAmountDebitCell.BeforePrint += NumCellBeforePrint;
accountAmountCreditCell.BeforePrint += NumCellBeforePrint;
accountSaldoCell.BeforePrint += NumCellBeforePrint;
accountSumCell.BeforePrint += NumCellBeforePrint;
reportAmountDebitCell.BeforePrint += NumCellBeforePrint;
reportAmountCreditCell.BeforePrint += NumCellBeforePrint;
reportSaldoCell.BeforePrint += NumCellBeforePrint;
}
private static void NumCellBeforePrint(object sender, PrintEventArgs e)
{
var currentCell = sender as XRTableCell;
if (currentCell == null) return;
currentCell.Visible = !currentCell.Text.Equals(ZeroValue);
}
你把密码放在哪里了?在designer.cs文件中?