Retrieve XML Data From DNN DynamicForm Datagrid ControlPosted: May 25, 2012
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
n.l.value(‘td’,’VARCHAR(200)’) AS td1,
n.l.value(‘td’,’VARCHAR(200)’) AS td2,
n.l.value(‘td’,’VARCHAR(200)’) AS td3
CROSS APPLY MyDGControlName.nodes(‘//tr’) n(l)
select * from mycte