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
170
c# - fixed rows with dynamic columns bound from database
posted

Hi,

In c# i've bound a datatable to the grid with dynamic rows. No problem.

But what about dynamic columns? I'm in a brain-free right now.

This is what i'm trying to do:

 

Group A

Group B

Group C

Buyers fee

 

 

 

Market fee

 

 

 

License fee

 

 

 

I started off with building the "fee" column using the quick designer.  The "groups" will be pulled in from the database.
I'm thinking I would need to build the columns dynamically?  Not sure right now.

If anyone has any suggestions to point me in a good direction, it would be much appreciated.

Thanks!

 

Parents
No Data
Reply
  • 28464
    posted

    Hello,

    Maybe you can try adding the columns in the InitializeLayout event of the grid and see how it goes with dynamic C# columns with fixed rows datasource. e.g. in InitializeLayout something along the lines of:

    TemplatedColumn tc = new TemplatedColumn(true);
     tc.Key = "ImageButton";
     tc.Header.Caption = "Image Button";
     e.Layout.Bands[0].Columns.Add(tc);
     

Children
No Data