TransformationInfo LoadFromDataRow

Delford Chaffin asked on December 5, 2014 22:24

I'm trying to load in a transformation and fill it with data. I can get the TransformationInfo object like this:

TransformationInfo tweetTransform = TransformationInfoProvider.GetTransformation("<name>");

I can create a new TransformationInfo object and pass in a DataRow like this:

TransformationInfo tweetTransform = new TransformationInfo(dr);

But how do I put the two together? The API lists a LoadFromDataRow method, but it is protected.


Recent Answers

Brenden Kehren answered on December 7, 2014 05:28

I don't understand fully what your question is or what exactly you are trying to do. Can you explain a bit more?

0 votesVote for this answer Mark as a Correct answer

Zdeněk Cetkovský answered on December 7, 2014 11:52 (last edited on December 7, 2014 11:55)


The first line of code uses the provider method, which gets the existing transformation object by searching for matching data record in the DB, the second one is TransformationInfo constructor, which accepts DataRow with TransformationInfo object data already obtained from the DB (e.g. by custom query). It accepts only the DataRow matching the CMS_Transformation DB table structure, so it cannot be used to actually perform transformation of your Page (document) data into resulting output. Is that what you were trying to achieve?

It's not possible to transform a custom DataRow in ASCX transformation directly, only through a Repeater (listing) control. Another alternative is to use Text/XML transformation and transform your data in the macro expression utilizing the ApplyTransformation method. Both these options are discussed in our forum thread.

Hope this will be helpful. Should you need any additional details, please feel free to ask.

Regards, Zdenek.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.