Dynamically Add Data Source to multi-select check box

  • 17 July 2018
  • 1 reply
  • 10 views

Badge +3

Hi Team,

I have created custom list. I want to bind multi-select check box data source dynamically using jquery. I there any approach to bind. Using below approach, but it's not working.

if (arrReportNames.length > 0)
{
var voptions = '';
for (i = 0; i < arrReportNames.length; i++)
{
var vreportname = arrReportNames;
console.log(vreportname);

voptions += '<input type="checkbox" name="CheckBox'+ i +'" value="' + vreportname + '"/>' + vreportname + '<br/>';
}
$('#'+ddlReportName).append(voptions);
}


1 reply

Userlevel 5
Badge +14

this is not supported by sharepoint/ASP since it breaks view-state mechanism.

you could find some workaround described here, but it's quite complex

 

Reply