This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, How would one do row validation with the datagrid? What I refer to, is validating the data for a given row and if there is an error then the row is highlighted and an error icon is displayed at the start of the row (on a separate column). Thanks Oscar |
|
|
Hi Oscar, This is not a built in feature, but you should be able to closely implement this yourself. First, you'll need to listen to property changes of cell values. This could either be done by listening directly to your model, or by attaching an event handler to the DataGrid.ValidateCell event. In whatever event handler you create, check the validation of the whole row, and if it is invalid, you could use the DataGrid.SetRowBackground to "highlight" the invalid rows. For more flexibility of how a row is highlighted, you could create a custom row style/template. Displaying the error icon should be the easy bit. Either display it in the row header, or as you mentioned, add a new column specific for the task of displaying the icon. Let me know if you have further questions about this. -Jason Fauchelle |
|