private void groupcell_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
XRTableCell cell = ((XRTableCell)sender);
string key = xrTableCell1.Text + xrTableCell2.Text + xrTableCell3.Text;
current += 1;
if (ht.ContainsKey(key))
{
cell.Text = string.Empty;
if (current == 1)
{
cell.Borders = DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right;
}
else
{
cell.Borders = DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right;
}
}
else
{
ht.Add(key, null);
cell.Borders = DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right;
i++;
}
}
可以通过控件的beforeprint事件控件当前控件的画法,已经画过的控件,不能再修改。。。