Home Forums WPF controls Xceed DataGrid for WPF multi-column cell validation

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #22985 |

    I have an Xceed DataGridControl whose ItemsSource property is a System.Data.DataTable. One column is a “start date” and another is an “end date” (there are other columns as well). I’ve written CellValidationRules for the columns that check that the start date comes before the end date. They work fine except when both dates are edited before either is committed. In that case, I would like the validation rule to validate the edited start date against the edited end date (not the committed end date). Is there a way to do that? A code snippet would be great.

    Thanks,

    Mark

    Imported from legacy forums. Posted by Mark (had 2371 views)

    Xceed Support
    Member
    Post count: 5658

    If you wish to access the currently edited value of a cell, then use the “ActualContent” property instead of the “Content” property on the Cell.

    Although the property is flagged as “internal” it is possible to access it via binding.

    You can refer to this post for details:

    <a href=”http://forums.xceed.com/forums/ShowPost.aspx?PostID=7250″>http://forums.xceed.com/forums/ShowPost.aspx?PostID=7250</a&gt;

    Imported from legacy forums. Posted by Marcus [Xceed] (had 218 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanks, Marc. I decided to use reflection to get the ActualContent value. Are there plans to expose ActualContent to allow for a cleaner solution?

    Regards,

    Mark

    Imported from legacy forums. Posted by Mark (had 3456 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.