I would like to know if it is possible to have a tool tip(or similar behavior)that will display message data related to specific cells within a row of a XamDataGrid based on message data contained in properties in my viewmodel.
As an example, each row of my grid is a line item of an order. Say there are 5 line items presently in the grid. Any given line item has quantity, ship method, price, etc. Say that a line item is added and the ship method is inappropriate as well as the selected ship address. Those two cells would be highlighted. When the rep hovers over the ship method cell with the mouse, a message contained in the viewmodel should display describing the ship method issue. When the rep hovers over the ship address cell of that row, a message describing the issue there should be displayed. If there are errors in one of the other line items the behavior should be similar.
Is this functionality possible?
Hello Loyd,
Thank for your post. I have been looking into your description and I can suggest using the IDataErrorInfo interface in your view model and the support for this interface inside the XamDataGrid. You can define you validation logic of the properties of your ViewModel and using the support for IDataErrorInfo of the XamDataGrid, when a value entered in a cell is not valid, the message corresponding to the invalid value will be displayed as tooltip of the cell. Also you can set the DataErrorInfoDisplayMode to Highlight, in order for the cells with invalid values to have red border and background. You can read more detailed information regarding the IDataErrorInfo and XamDataGrid, here in our documentation: http://help.infragistics.com/NetAdvantage/WPF/current/CLR4.0/?page=xamDataPresenter_Enable_IDataErrorInfo_Interface_Support.html. I have created a sample application for you, that shows how you can implement this approach.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
I am just checking if you require any further assistance on the matter.
Hi Krasimir,
I have not had an opportunity to examine this, yet, as a potential solution. I got pulled from the project this would be a part of on to a different client's project for a time. I should roll back around to this shortly, however. I will update this thread once I have an opportunity to do so. Upon initial inspection, it would appear that it may work for my needs. I will know more shortly.
Lloyd
Hello Lloyd,
Thank you for your reply. Looking forward to hearing, whether the approach I have suggested helped solving your issue.