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
25
xamGrid hierarchical data : sorting and style
posted

Hello,

 

I'd like to show hierarchical data ( such as in sample https://www.infragistics.com/samples/silverlight#/grid/hierarchical-financial-data ). I'd also like to sort data.

 

1. The problem is that after pressing sort button ( all rows are expanded) rows that has children are sorted correctly, but their children rows are not sorted. How can I fix it ?

2. The second problem is that I'd like to make all rows, that have children and can be expanded, to have different style  ( for example, to be bold). Couldn't you tell mw what should I do or give an exapmle?

3. I want also make my columns resizable, but when i'm trying to change the width of the column ( with hierarchical data) the borders cease to be abreast. ( you can see attached picture)  Is this problem solvable?

 

Thanks a lot!

 

Tatiana.

  • 25
    posted

    Hello.

    Can anybody answer me and describe how to make this control work correctly ?

  • 21382
    posted

    1) Since your child data isn't in the same group as your parent data you would need to propagate the sort down to that level.  You could do this using the ColumnSorting/ColumnSorted event.  Detect what level / ColumnLayout that the sort is happening and if it is the top level, set the associated column on the child level to have the same sort direction.

     

    2)  You could use our ConditionalFormatting feature of the grid to apply a row style in this case.  But you would need to make a custom rule to do that

     

    This forum post has a sample in it that shows how to make a custom rule

    https://www.infragistics.com/community/forums/f/retired-products-and-controls/53040/custom-conditionalformatting/275161#275161

     

    3) The Grid will not keep your child bands insync with the parent level.  So to do this you could use the ColumnResized event and when the event is raised propagate the column width down to the child level.