How would you change the barcode encoding at runtime if the barcode widget is used in a template?
To clarify, user selects barcode type from a dropdown list, according to selection the barcode changes.
The barcode widget is used in a listview as a template.
For example, in the listView -
@(Html.Kendo().ListView()
.Name("listView')
.ClientTemplateId("aTemplate")
:
:
)
<script type="text/x-kendo-tmpl" id="aTemplate">
<div class="product">
<h3>#:ProductTitle#</h3>
@(Html.Kendo().Barcode()
.Name("Id_#=Id#")
.Value("#=Barcode#")
.Encoding(BarcodeSymbology.Code128) <-- how whould you change this at runtime?
.Height(50)
.Width(180)
.ToClientTemplate()
)
</div>
</script>
Regards,
Menashay
To clarify, user selects barcode type from a dropdown list, according to selection the barcode changes.
The barcode widget is used in a listview as a template.
For example, in the listView -
@(Html.Kendo().ListView()
.Name("listView')
.ClientTemplateId("aTemplate")
:
:
)
<script type="text/x-kendo-tmpl" id="aTemplate">
<div class="product">
<h3>#:ProductTitle#</h3>
@(Html.Kendo().Barcode()
.Name("Id_#=Id#")
.Value("#=Barcode#")
.Encoding(BarcodeSymbology.Code128) <-- how whould you change this at runtime?
.Height(50)
.Width(180)
.ToClientTemplate()
)
</div>
</script>
Regards,
Menashay