Retrieve XML Data From DNN DynamicForm Datagrid Control

The Datagrid is a new control added to DynamicForm 4 . It is handy to design a set of controls dynamically, for example, you can reuse the same set of controls to collect automobile information for a user if the user has more than one vechile.

You can view the result or email the result without any difficulty. However, if you want the dataset in a relational manner, you need to know some basic query skill to convert XML data into relational table columns.

Here is the code snippet which may be helpful if you come to this page:

with mycte as

(SELECT DynamicForms_ResultsID,


n.l.value(‘td[1]’,’VARCHAR(200)’) AS td1,

n.l.value(‘td[2]’,’VARCHAR(200)’) AS td2,

n.l.value(‘td[3]’,’VARCHAR(200)’) AS td3

FROM dbo.formdata_mytable

CROSS APPLY MyDGControlName.nodes(‘//tr’) n(l)


select * from mycte


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s