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
715
How to create hierrarchical structure of columns in runtime?
posted

Hello!

How to create hierarchical structure of columns in runtime?

So, I can create colums structure of grid in runtime for the 'root'  table.

But how to create this structure for the 'root' and 'subroot' tables too?

for example:

this.ZSheet.Columns.Add(......);

Of course column names (Property names) is known for the 'root' and 'subroot' tables.

Thank you.

  • 715
    Suggested Answer
    posted

    I`ve found it!

      this.ZSheet.Columns.Add(CreateDataPickerTemplate("myHeader", "DateTime_field", true, true));
                ColumnLayout cl = new ColumnLayout(this.ZSheet);
                cl.Key = "DateTime_field1";
                cl.Columns.Add(CreateDataPickerTemplate("myHeader", "DateTime_field1", true, true));
                this.ZSheet.ColumnLayouts.Add(cl);

    CreateDataPickerTemplate  - creates DataTemlates dynamically.