0

enter image description here

I want to draw error icon in all the cell which are validated at a time in datageid in devExpres.

I was draw a error icon in cell but there is some problem, 1.Color of the cell is overwritted on the error icon. 2.Text of grid and error icon both are mixed that why text is not display excat.

I want perfect example. Is any one have solution?

Nirav Vasoya
  • 356
  • 3
  • 18
  • iam not sure what you want to achieve but take a look at ValidateRow event. – Sebi Jul 02 '14 at 11:18
  • I already done that task, but its validated only row by Row, But i want to if error icon display in perticular cell in perticular row, but when ever focused goes in another row error icon was remove from those cells. – Nirav Vasoya Jul 02 '14 at 11:36
  • 1
    Try the ValidatingEditor event ;) – Sebi Jul 02 '14 at 14:55
  • In validatingEditor it is not possible to persists the error icon in all the cell, but i can check the validation but not solving my issue... – Nirav Vasoya Jul 14 '14 at 08:21

1 Answers1

2

This can be achieved using the CustomDrawEventHandler as shown below

Private Sub CustomDrawEventHandler(. ByVal .. As )

        If IsError(...) Then

            e.EditViewInfo.ErrorIconText = "IsNull"

            e.EditViewInfo.ShowErrorIcon = True

            e.EditViewInfo.FillBackground = True

            e.EditViewInfo.ErrorIcon = DXErrorProvider.GetErrorIconInternal(ErrorType.Critical)

            e.EditViewInfo.CalcViewInfo(e.Graphics)

        End If

End Sub

For more info check this DevExpress Kb article: http://www.devexpress.com/Support/Center/Example/Details/E1933

Sébastien
  • 11,860
  • 11
  • 58
  • 78
YReddy
  • 36
  • 2