Page 1 of 1

How to add column to databand programatically

Posted: Sat Mar 01, 2014 5:45 pm
by theregister
Say I have this:

Code: Select all

Dim myDataband As New StiDataBand()
But then I want to do something like this:

Code: Select all

Dim myColumn As New StiDataColumn
myDataband.Components.Add(myColumn)
But it says that 'Stimulsoft.Report.Dictionary.StiDataColumn' cannot be converted into 'Stimulsoft.Report.Components.StiComponent'.
Then I tried to convert the column to a component but it didn't work:

Code: Select all

TryCast(Report.GetComponentByName(myColumn.Name), StiComponent)
It said the expression wasn't a method.

So how can a column be added to a databand via code?

Re: How to add column to databand programatically

Posted: Mon Mar 03, 2014 6:45 am
by Alex K.
Hello,

Please check the sample project in the attachment.

Thank you.