I bind-data in select option,
<select
id="TanentNamesDB"
data-bind="
value:SelectedOrganisationData,
event: { change: ConnectSelectedOrganization } ,
options: GridAllOrganisationDataList,
optionsText:'TenantName',optionsCaption: 'Choose your organisation ...',
optionsId:'SelectTenantName'
"
class="dropdown">
</select>
It looks like this,
And, how to change the selected value using javascript or jquery, When I change the option manually it will automatically update to the database,
I tried different, different way like,
<script type="text/javascript">
var SelectOp = document.getElementById('TanentNamesDB');
SelectOp.selectedOption(TanentNameSelected);
$("#TanentNamesDB option[text='BD']").attr("selected", "selected");
$("#TanentNamesDB").setSelectedOption("BD");
</script>