Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
How to change the Record style on XamDataGrid

Hi, I'm trying to change the style of the record on a XamDataGrid, based on the status of the save operation I perform on the data in the Grid. I assign  a value to the a specific column on the Grid and initiate a Save command. The DataLayer passes on the information to the db and once the db Save operation is complete, I get a DataSet back  with the status of Save operation on each record (It could be a success of a failure due to a logical reason). Now I want to display the status of this Save operation by matching the record on the resultant status dataset to the record which was intended to be saved. If the Status of the Save operation on a specific record is successful, I display the updated record with a greed background indicating success and in red in case of failure as indicated in the Save status dataset. Could somebody help me with this functionality.




  • 69686
    Suggested Answer


    You can do this by creating a style for the DataRecordPresenter/ DataRecordCellArea elements and control the background property with a DataTrigger, which binds to the Cells[x].Value of the DataContext (DataRecord). Another way would be to use IValueConverters. You can see an example with converters here.

  • 12773

    Hi Shravan,

    I just wanted to know if you were able to solve your issue based on Alex's suggestions or you still need help? Just let me know.

    Thank you.

    Developer Support Engineer
    Infragistics, Inc.