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
130
Different column headers on different rows
posted

I'm not sure if this is possible and if it is what feature I need to use - but what I want to be able to do is have different column headers for different rows on my grid. One of the columns of my data is a "Type" - so I guess I need to somehow group by type and display them in different sections of the grid - but can I display the SAME columns in each section, only with DIFFERENT column header captions?

 eg - the data could look like this:

Type, Data1, Data2
A, 123, 456
A, 234, 567
B, Mark, 30
B, Alf, 31

and I would like the grid to look something like this -

| Type A |
--------------
| Price    |  Qty     |
---------------------------
| 123      | 456      |
| 234      | 567      |
---------------------------
| Type B |
---------------------------
| Name   |  Age     |

----------------------------
| Mark    | 30         |
| Alf       | 31         |
----------------------------

I hope I've explained this well enough - please help!

Thanks

Mark

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Mark,

        No, this is really not possible.

        You can have sibling bands in your grid. SO you could have a root-level row and under that you could have two (or more) bands with different sets of columns. But this would all have to be done on the data source and all of the rows that were of the same type would have to be grouped together, which I'm not sure you want. 

        If you want to have a truly dynamic structure like this, you might want to consider using the UltraWinTree control, instead of UltraWinGrid. In FreeForm ViewStyle, you can apply a different ColumnSet to each node in the tree and each node can have a completely different data structure than all the other nodes.  

Children
No Data