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
115
Dynamic addition of columns to ultragrid with grouping
posted

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:

 

 

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    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.

     

Children