Comments (11)
How does one call this function from the aspx page ?
Is it something like
$('mydropdown').updateSelection() ;
Original comment by [email protected]
on 8 Sep 2009 at 10:30
from dropdown-check-list.
to call this use:
$('#mydropdownID').dropdownchecklist("updateSelection");
Original comment by [email protected]
on 8 Sep 2009 at 10:38
from dropdown-check-list.
Thanks. Do you have a function for unchecking all the items ? or possibly point
me in
the right direction ?
Original comment by [email protected]
on 8 Sep 2009 at 10:57
from dropdown-check-list.
@victorbh: have a look at _syncSelected function for some clues.
Something like below will do it (if you don't need to keep track of the
firstItemChecksAll option):
selectAll: function() {
var allCheckboxes = this.dropWrapper.find("input");
allCheckboxes.attr("checked", true);
// do the actual synch with the source select
var selectOptions = sourceSelect.get(0).options;
allCheckboxes.each(function(index) {
$(selectOptions[index]).attr("selected", true);
});
// update the text shown in the control
self._updateControlText();
},
and then call with $("#s1").dropdownchecklist("selectAll")
Original comment by adrian.tosca
on 12 Sep 2009 at 6:38
from dropdown-check-list.
Original comment by adrian.tosca
on 12 Oct 2009 at 7:19
- Changed state: Done
from dropdown-check-list.
Sorry about this novice question, but I can't see the "updateSelection" function
defined in the latest release - 0.9. Has it been done as a different function
name?
Original comment by kevinjansz
on 23 Mar 2010 at 1:42
from dropdown-check-list.
As of version 0.9 the function is not needed because ddcl automatically
synchronizes
with values changes in the source select. What are you trying to do?
Original comment by adrian.tosca
on 23 Mar 2010 at 12:22
from dropdown-check-list.
We've got a separate (non-jQuery, legacy) script that does a select all/none on
the
input. Perhaps the way this script works, but when it runs I can see the hidden
select is being updated (as it would if DDCL was not applied) but the dropdown
widget
didn't seem to automatically synch. That would be awesome if it did - is that
the
expected behaviour?
If I add in the updateSelection function and then call this explicitly after the
select all/none script it seems to work perfectly - ie takes the selects from
the
hidden select.
I'm attaching a test case if it helps (drop this in the ddcl/src folder). The
first
select all/none shows the auto-synch isn't happening.
Original comment by kevinjansz
on 23 Mar 2010 at 10:57
Attachments:
from dropdown-check-list.
saw the comment on the demo page - update from selection can be achieved with a
destroy and recreate, ie no need for "updateSelection" function:
$("#select").dropdownchecklist("destroy");
$("#select").dropdownchecklist();
thanks, great work
Original comment by kevinjansz
on 25 Mar 2010 at 4:31
Attachments:
from dropdown-check-list.
If you're programmatically changing the value of the source select, you'll need
to
trigger a change event on the select to get ddcl to recognize the change.
Example:
$("#sourceSelect option").attr("selected","selected");
$("#sourceSelect").trigger('change');
If you're not using jQuery you'll need to find another way to trigger the
change...
Original comment by [email protected]
on 4 Apr 2010 at 11:56
from dropdown-check-list.
Hi Need ur help on following scenario:
---------------------------------------
Here is my list
All
A
B
C
D
1
2
All History
I wanted to write code whenever any or all (A,B,C,D) is selected uncheck "All"
Note: here selection of ALL dhould not select every Item in list.
please give some snippet which i can put in my jsp call also
Original comment by [email protected]
on 3 Mar 2011 at 7:58
from dropdown-check-list.
Related Issues (20)
- showing multiple dropdownchecklist when dynamicaly selecting items in dropdown check list
- Does not work in Hebrew
- Dropdown goes behind current DIV
- dropdown checklist not firing selected index changed event
- disable or readonly not working
- Stop this project. HOT 3
- The dead of a project is the cause of the birth of another project - jAutochecklist
- dropdown-check-list does not respond to "mouseenter"
- When page loads, multiselect displays not styled in it's open boxes first, then finally is styled.
- how to select item get from database
- on submit, form only picks up the FIRST selection HOT 1
- Dropdown checklist display issue in IE9
- Dropdown not working in content head and user control
- Title attribute not causing DDL to show hover text
- t HOT 1
- Dropdown checklist is not being displayed in correct position after window scroll.
- dropdown checklist is not working in jquery modal popup
- Script is not loading
- Onclick for checkbox item jumps scroll list down
- Problem to get Value from Label
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dropdown-check-list.