Hi,
I am new to ultragrid and I want to create a grid as shown in the attached figure.Please let me know the steps how can I create such grid. I am using binding source to bind the grid, please help me to know how should I manage the binding source to bind such grids.
Thanks a lot in advance. Any code sample will be highly appreciated.
Here is the image:
This seems pretty straightforward. Which part of this is giving you trouble?
What I would do is bind the grid to a DataSource that contains all of the columns you need. So Col1, Col2, Col3, C1, C2, C3, etc.
Every column must have a unique name, so you will have to give all of the C1 columns a unique Key. Maybe you could preface the name of the column with the date.
To provide the date headers are the top, you have a couple of options. It looks like you only need one row of headers for the groups, so you could do this using the basic groups and levels functionality of the grid. Just add groups to the band using the Groups collection. Then assign each column to a group. If you take this approach, every column must be in a group, so you will need a group for the first three columns, as well, but you could give it a blank caption.
Thanks mike for your reply.
The problem is that the columns coming under months are dynamic, means sometime it may be 2 like Jan-11,Feb-11 some sometime it may be 4 to 5 and columns under each months are stattic means always there will be 3 columns under each month.
Out Data is coming in xml format and I have to create a class and corresponding properties for that.
Here is the example of the data coming in xml format:
<ItemList> <Item> <Col1>value1</Col1> <Col2>value2</Col2> <Col3>value3</Col3> <MonthList> <Month> <C>Jan-11</C> <C1>somevalue</C1> <C2>somevalue</C2> <C3>somevalue</C3> </Month> <Month> <C>Feb-11</C> <C1>somevalue</C1> <C2>somevalue</C2> <C3>somevalue</C3> </Month> </MonthList></Item><Item>................ </Item>
</ItemList>
Here I have shown only 2 months data. It may be of 3 to 12 months. Generally it varies from 1 to 12 number.
So please help me how can I proceed with it.
Thanks in advance.