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
290
Nested Panel Styling
posted

I'm populating XamDataGrid using DataTables and DataRelations. 

  1. On clicking +, I would like to change the background color of the clicked row. On collapsing, I would like to revert the background color to the original color. How can I achieve this please ?
  2. Sale-Purchase is a DataRelation. I would like to remove the background color of this row or limit the background color to one cell instead of spanning the length of the child table.
  3. How can I put a border around the nested panel ?

I have been struggling for last few hours trying with no luck. 

Parents
No Data
Reply
  • 22015
    posted

    Hello,

     Thank you for your post. I have been looking into it. For your first requirement regarding the background of the expanded I can suggest to set a style for the DataRecordPresenter. In the style can be set a trigger for the IsExpanded property, when it is true – the background changes its color.

    For your second requirement regarding the background of the certain row I can suggest to handle the SelectionChanged event. In the event handler you can check if the selected record is the one with name ‘Sale-Purchase’, if yes to set its background to transparent.

    For your third requirement I can suggest to create a style for the DataRecordCellArea and apply the style for the second FieldLayout.

    I have created a small sample for you to be able to see this behavior. Please find the attached sample application and feel free to let me know if you have any further questions on the matter.

    xamDataGridDesig.zip
Children