in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

getting to the errortext property

Last post 9/14/2007 3:17 AM by Holger Persch [DX-Squad]. 1 replies.
Page 1 of 1 (2 items)
Sort Posts:
Previous Next
  • 9/13/2007 2:38 AM

    getting to the errortext property

    Using the VGrid control with embedded textedit editors, I want to be able to add a new record to the grid, and then set the error notifications to indicate required fields before the user starts entering data.

     I cannot find where I can get access to the textedit baseedit.errortext property anywhere but in the validateeditoreventargs argument in the grid validatingeditor event.

     Can I get access to the baseEdit parent class of a specific textedit editor outside this event?  If it is not possible to access the errortext property of the baseEdit class, can I throw the grid.validatingeditor event programmatically immediately after adding a new blank record?

  • 9/14/2007 3:17 AM In reply to

    Re: getting to the errortext property

    Hello Peter,

    There is a more elegant way to implement data validation:

    #1 Implement the IDXDataErrorInfo into your record class. This allows to validate a new record as soon at is added to datasource.

    #2 Subscribe to VGridControl's ValidateRecord event. Just set the Valid property of the ValidateRecordEventArgs class to true or false depending on the state of the validated record.

    Hope this helps,
    Holger

    Holger Persch - [DX-Squad]
Page 1 of 1 (2 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED