how to get bootstrap multiselect selected values from code behind? - bootstrap-multiselect

It is very easy to get bootstrap multiselect listbox's selected values using javascript like this
$('listbox1').val();
But I want to access it from code behind.

You could probably get more/better assistance by posting some of your code or what you have tried.
However, this might put you in the right direction?:
Bootstrap Multiselect Get Selected values on HttpPost

Related

How to bind Dynamic CheckboxList template in KendoUI

I wanted to bind a checkboxlist using KendoUI when a modal pop is opened.
On modal popup load I wanted to get data from a webapi which will have json response and bind it to checkbox kendo Ui template.
I referred kendoUI forums all samples are using static data. Can someone please guide me to the right direction where I can consume dynamic data.
Thank you!
There's a lot of ways to approach this.
I think the easiest way would be to use a TreeView with checkboxes configured that only returns a single level of nodes, then just show it in a Window or Dialog as you would show any other view. This way you get decent, default item formatting of the TreeView with having to use a template, but you don't get paging if your datasource is large.
You can also use a ListView with a template that formats the data with a checkbox. This requires a template but you get paging capability. Once again, you just display the ListView in a Window or Dialog as normal.
Here's a simple demo of a ListView implementation: http://dojo.telerik.com/#Stephen/iwOhIV
It is a combination of Kendo demos: http://demos.telerik.com/kendo-ui/dialog/treeview-integration with the TreeView replaced with the ListView from this demo(http://demos.telerik.com/kendo-ui/listview/remote-data-binding) and then the styling tweak with a template that uses checkboxes.
The rest of it is up to you(persisting/loading checked state, etc).

Kendo UI Grid inline edit not work when use ObservableArray as data for data source

I'm trying to use a kendo.data.ObservableArray as data for data source of the grid. It shows ok. When edit inline, change a field, then cancel, the values are changed. When clicking edit, then click edit on another row, the last one remains in the edit mode. Sometimes cancel not work. On the array it works as expected.
I took the Kendo UI Demo, http://demos.telerik.com/kendo-ui/grid/editing-inline, to reproduce the issue. Here is the issue: http://dojo.telerik.com/uLiCi/2
Does anyone have any idea why so strange behavior?
In my opinion, it should work with both, array and observable array.
Thanks in advance

Kendo dropdown on changing value cannot bind to view model

I have got problem with setting selected value of view model when changing option in dropdown.
I do not want to describe it because it will be easier just to show code by http://jsbin.com/ritor/9/edit
Just want to mention about what is wrong
When I am changing dropdown value there is a error in console
Uncaught TypeError: undefined is not a function
and view-model value is unchanged.
I have no idea what is going wrong with my code.
Solution:
Ok a little change make code works:
http://jsbin.com/deyuse/8/edit
You have told the drop down list template to bind to a value that it does not have context to. Additionally, you have told the grid column to bind to the incorrect value. It should be selectedValue not FieldValue. Why is fieldValues a function?
Furthermore, you are trying to implement an editable grid. Your implementation is not configured for that. Please follow the documentation at Kendo UI.
Here's your corrected JsBin example.
Update: After deeper review, your implementation needs considerable refactoring. I've revised my answer.

dojo comboBox automatically trigger dropdown

I am using a comboBox and for some reason the automaticall triger for the dropdown menu to appear when you have some results is not working. Is there any way to trigger this dynamically. Maybe onChange event?
I am using dojo 1.6!
A code example would be nice so as we can recommend alternatives or better solutions, but in the case that all you want to do is open a dropdown programmatically, you should find openDropDown() and toggleDropDown() functions on the combobox object. If you have the dojo source you can find more dropdown related functions in dijit/_HasDropDown.js, which combo box inherits from.

Select a different value in a static dropdown using angular.js

I have a Magento product page producing static select elements, to which the price mechanism is tied in to backend, so i can't touch those dropdowns. I am using an angular.js radio element to recieve user input, which should in turn update the static dropdown's selected option.
I don't know how to link the two, I have recreated the problem here: http://jsfiddle.net/ldn_tech_exec/smBdC/1/
I want the radio button to update the dropdown, but I can only manipulate the dropdown after it has been created, perhaps using jquery to insert any angular directives required.
UPDATED again: Your select list needs an ng-model and the options should be generated with ng-options. When you select a radio button, the controller method you trigger should update that ng-model, which will cause the select list to update.
See http://docs.angularjs.org/api/ng.directive:select
Another way to do this is to use ng-selected. See
http://docs.angularjs.org/api/ng.directive:ngSelected
UPDATE #3: I missed the fact that you can't modify the select list initially. See my fiddle in the comments below for a working solution.
It sounds like you have some product where the price depends on the options set.
If this is the case then updating the drop-down from your radio button is relatively trivial - or at least depending on your prototype/jquery skills.
However there is a gotcha: once you update the drop-down in javascript with an 'invisible hand' there is a whole lot more javascript code to update the price and availability. To do this you need to bubble the event. This doesn't happen automatically if using prototype.
I hoped I could rustle up the 'bubble code' but I don't currently have it to hand, besides, you aren't stuck at that point, yet...

Resources