Hi,
I want to use vue.js to get the values of a radiobuttonlist with controdatasource
The script is included in ScriptBlock
Then the controldatasource is
<ControlDataSource Id="cds_Contacts" Commandtext="SELECT uc.ContactID as ContactID
,uc.FirstName + ' ' + uc.LastName as Contact
FROM dbo.XMP_User_Contact uc
WHERE uc.UserID = @UserID
--Order by uc.Date_Updated desc ">
<Parameter Name="UserID" Value='[[User:ID]]' DataType="Int32" />
</ControlDataSource>
and the <div>
<div class="app3" style="color:red">
<radiobuttonlist id="ContactID" DataField="ContactID" DataValueField="ContactID" DataTextField="ContactID" DataSourceId="cds_Contacts" DataType="int32" AppendDataBoundItems="True" v-model="picked">
</radiobuttonlist>
<span>Picked: {{ picked }}</span>
</div>
In the end the script
var app3 = new Vue({
el: '#app3',
data: {
picked: [ContactID]
}
});
However the {{ picked }} does not go populated.
Even the more simple code like the one explained here does not go ok in XMOD https://vuejs.org/v2/guide/syntax.html#Raw-HTML
<div id="app1">
<p>Using mustaches: {{ rawHtml }}</p>
<p>Using v-html directive: <spanv-html="rawHtml"></span></p>
</div>
There is any special things related to XMOD & vue.js or my code is not ok?
For sure the examples which are on vue.js are not for controldatasource.
here is a Fiddle with the tryout http://dnndev.com/fiddle/fid/689
Thank you!