Custom data source development question

Bryan Johnson asked on July 12, 2016 01:14

I'd like to build a custom data source web part that pulls data from a 3rd party REST service. I've started here: Its not immediately obvious to me what the "DataSource" property returned by the GetDataSourceFromDB method of the CMSBaseDataSource class should consist of. Can it be a .NET DataSet or do I need to return a CMS.DataEngine.ObjectQuery type? Is there any documentation or example that would help explain what type of data should be returned in the DataSource object to be consumable by a Basic Repeater? -Thanks

Correct Answer

Trevor Fayas answered on July 12, 2016 06:17

It can be any DataSet (possibly also a datatable). I've developed these myself, very flexible! I used Datasets returned from the QueryInfoProvider.ExecuteQuery, but you can build your own dataset and use that.

THere are also different types of data source webparts you can create, including xml and the like, but a System.Data DataSet is pretty flexible.

0 votesVote for this answer Unmark Correct answer

Recent Answers

Bryan Johnson answered on July 12, 2016 19:33

Thanks, Trevor. I tried a DataSet and a DataTable. Both can be used and are consumed by a Basic Repeater without problems. Thanks for your insight.

0 votesVote for this answer Mark as a Correct answer

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