jQuery UI Widgets › Forums › General Discussions › GET checket items from jqxDropDownList in jqxToolBar
Tagged: toolbar
This topic contains 1 reply, has 2 voices, and was last updated by Peter Stoev 7 years ago.
-
Author
-
Hello,
how can get all checked items in ddlistjobtype ?
Why I need variable e.g. ddlist1Min ? What exactly ddlist1.add(ddlist1Min) do?Thanks for your advice.
Miroslav
***********************************************************************************************
var ddlistjobtype, ddlistjobtypeMin, ddlist1, ddlist1Min, dtinput1, dtinput1Min;
$(“#MainToolBar”).jqxToolBar({
width: ‘100%’,
height: 35,
tools: “custom | button button button | dropdownlist | dropdownlist | dropdownlist | dropdownlist | dropdownlist | input”,
initTools: function (type, index, tool, menuToolIninitialization) {
switch (index) {
case 0:
var njv = “<div style=’margin: 2px; margin-right: 50px;color: blue’><b>NJV v1.0</b></div>”;
tool.append(njv);
break;
case 1:
tool.text(“Config”);
break;
case 2:
tool.text(“Search”);
tool.click(function() { $(“#window_filter”).jqxWindow(“open”); });
break;
case 3:
tool.text(“Reports”);
break;
case 4:
if (menuToolIninitialization === false) {
ddlistjobtype = tool;
} else {
ddlistjobtypeMin = tool;
}
tool.jqxDropDownList({ width: ‘150px’, height: ’25px’, source: jobtype_source, checkboxes:true });
tool.jqxDropDownList( ‘checkItem’, “Backup” );
tool.jqxDropDownList( ‘checkItem’, “Snapshot” );
tool.jqxDropDownList( ‘checkItem’, “Restore” );
break;
case 5:
tool.jqxDropDownList({ width: ‘150px’, height: ’25px’, placeHolder: ‘Master’ });
break;
case 6:
tool.jqxDropDownList({ width: ‘150px’, height: ’25px’, placeHolder: ‘Policy’ });
break;
case 7:
tool.jqxDropDownList({ width: ‘150px’, height: ’25px’, placeHolder: ‘Client’ });
break;
case 8:
if (menuToolIninitialization === false) {
ddlist1 = tool;
} else {
ddlist1Min = tool;
}
tool.jqxDropDownList({ width: ‘100px’, height: ’25px’, source: from_source, selectedIndex: 2 });
break;
case 9:
if (menuToolIninitialization === false) {
dtinput1 = tool;
} else {
dtinput1Min = tool;
}
tool.jqxDateTimeInput({ width: ‘350px’, height: ’25px’, showTimeButton: true, selectionMode: ‘range’, formatString: “yyyy-MM-dd HH:mm:ss”, value: new Date(), disabled: true });
break;}
}
});ddlist1.add(ddlist1Min).on(“change”, function (event) {
var args = event.args;
if (args) {
var indx = args.item.index;
if (indx == 0) {
dtinput1.jqxDateTimeInput({ disabled: false });
} else {
dtinput1.jqxDateTimeInput({ disabled: true });
}
}
});Hi Miroslav,
You may look at: https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtoolbar/defaultfunctionality.htm?light which shows how to use the DropdownList or ComboBox within the toolbar.
Best Regards,
Peter StoevjQWidgets Team
https://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.