回复 15楼q406157290的帖子
终于找到了,重写 CreateRowHeaderContent ,里面对排他的获取也是通过Row.GetErrors方法获取,所以也替换成之前提到的自己定义的GetErrors方法就可以了:
- public override void CreateRowHeaderContent(C1FlexGrid grid, Border bdr, CellRange rng)
- {
- base.CreateRowHeaderContent(grid, bdr, rng);
- if (grid.ShowErrors && rng.Column == 0)
- {
- string errors = GetErrors(grid.Rows[rng.Row], null);
- if (!string.IsNullOrEmpty(errors))
- {
- bdr.Child = new Image
- {
- VerticalAlignment = VerticalAlignment.Center,
- HorizontalAlignment = HorizontalAlignment.Center,
- Stretch = Stretch.None,
- Source = this.GetErrorImage()
- };
- this.SetErrorTip(grid, bdr, errors);
- }
- }
- }
复制代码 |