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
250
UltraGrid Datavalues become Colheaders (Pivot ?)
posted

Hi there,

Sorry about the subject title ... I really didn't know how to "name" it ...

I searched a lot on the net and in this forum, but I couldn't find a solution.

I'm rather new to Infragistics, so, sorry it this sounds like a stupid problem ...

The idea is to represent data in another "view" as it is stored in the database ...

I'm having to following data, stored in a table in a SQLServer DB

Fieldnames: Month  Office  Profit

Month Office Profit
Jan Antwerp 100
Feb Antwerp 300
March Antwerp 500
Jan Brussels 700
Feb Brussels 250
March Brussels 450

(as you can see, the months are repeating for every city ....)

 

Now, the idea is to "show" this data in an UltraGrid, as follows...

Month Antwerp Brussels
Jan 100 700
Feb 300 250
March 500 450

Any idea how this can be done ?

 

 

Thanks in advance for your answer !

Kind regards,

Johnny Driesen

Belgium

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Johnny,

    The grid will show the data in the same structure as the data source you apply to it. It can't modify the structure like you have here. But you could create a data source, like a DataTable or an UltraDataSource with the colmun structure you want and bind that to the grid.

    Another option you might want to consider is, you might want to turn on the AllowColumnMerging property of the grid. This won't give you the view you have here, but it's sort've similar in that it will merge all of the like values together into one big cell.

Children
No Data