w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
jQuery Auto complete plugin, multiple selection overrides previous selection
I'm not 100% sure if this is what you are looking for, but the select event is not what you want. It seems to be overwriting the value AFTER you run the function. I tried this, and it seemed to add values to the array: (I just changed it to focus) focus: function(event, ui){ var terms = this.value.split(", "); // remove the current input terms.pop(); // add the selected item terms.push(ui.item.value); // add placeholder to get the comma-and-space at the end terms.push(""); this.value = terms.join(", "); return false; }

Categories : Javascript

Primefaces data table Row selection and multiple checkbox selection not working
In your datatable tag, Use this <p:ajax event="rowSelectCheckbox" update="someComponent" /> <p:ajax event="rowUnselectCheckbox" update="someComponent" /> <p:ajax event="rowSelect" update="someComponent" /> <p:ajax event="rowUnselect" update="someCompoent" /> <p:column selectionMode="multiple" style="width:4%" /> you need to fire these four ajax events and make sure you make the column selectionMode as multiple

Categories : JSF

VBA How to get Multiple Selections with .Selection
What you need is reference to Areas collection of Selection. It will go this way: 'for first cell: Selection.Areas(1).Address 'for second cell: Selection.Areas(2).Address Both will return address of cells but you could change it accordingly.

Categories : Vba

List Box multiple value selection
When a List Box has its Multi Select property set to "None" then you can retrieve the selected value by simply referring to Me.List0.Value However, for multi-select List Box controls you need to iterate through the ItemsSelected collection to determine the items that are selected: Dim ItemIndex As Variant For Each ItemIndex In Me.List0.ItemsSelected MsgBox Me.List0.ItemData(ItemIndex) Next

Categories : Ms Access

Multiple selection of three tables
If I understand correctly just use JOIN SELECT o.*, a.* FROM autosorder_tab ao JOIN order_tab o ON ao.or_id = o.id JOIN auto_tab a ON ao.au_id = a.id ORDER BY o.id, a.id Here is SQLFiddle demo UPDATE If you want to group your information per order use GROUP BY and appropriate aggregate functions. For names of cars you want to use GROUP_CONCAT() SELECT o.id, o._date, GROUP_CONCAT(CONCAT(a.str_1, ' ', a.str_2) ORDER BY a.str_1, a.str_2 SEPARATOR ',') autos, SUM(hours) hours, ... FROM autosorder_tab ao JOIN order_tab o ON ao.or_id = o.id JOIN auto_tab a ON ao.au_id = a.id GROUP BY o.id To change a delimiter use SEPARATOR clause. Or use comma by default and then when iterating over the result set in your client code change

Categories : PHP

If then record selection with multiple conditions
Where abouts are you inputting your formula within crystal? It is very important. You should be able to achieve what you want by using conditional suppression in the details section of your report. Something like this... //Untested// IF {V_JOB.TASK} LIKE "*IN" AND {V_JOB.CLOSED} = "Y" AND {V_JOB.DATE} >= {?FrDate} AND {V_JOB.DATE} <= {?ToDate} THEN False ELSE True This will suppress results where they do not equate to the above conditions. I found your question a little unclear so this answer might not be perfect for your needs, but hopefully it's a shove in the right direction.

Categories : Mysql

Multiple selection strange behaviour
The only answer I could find is to override onRowClick function from datatable.js. The change is in line if ($(event.target).is("td,span:not(.ui-c)")) {, I've just changed to if ($(event.target).is("td,span:not(.ui-c),.ui-cell-editor-output")) { and now it works. I know that this is not good way.

Categories : JSF

jquery multiple selection box value sharing
To get the values you can use change() events. I see in your selects, the values you have are letters, I would consider changing them to the numerical values of the actual select text, then you can do: $("#select, #select2").change(function() { alert(this.value); }); If you want to add them, you can do something like this: var total = 0; $("#select, #select2").change(function() { total += parseInt(this.value); alert(total); });

Categories : Jquery

How to add multiple selection into a many-to-many model in Ember.js?
I guess what you need to do is as you already mentioned to create a App.Fruit record for every selected fruit and add it to the newly created App.Person. Basically the important bit is: App.PersonController = Ember.ArrayController.extend({ pickThem: function(){ var aperson = App.Person.createRecord({name: "Alice", myfruits: []}); this.get('pickedFruits').forEach(function(item){ aperson.get('myfruits').pushObject(App.Fruit.createRecord({kind:item, likedBy:[aperson.get('id')]})); }); aperson.save(); } }); Then provide a model for your person template: App.PersonRoute = Ember.Route.extend({ model: function() { return App.Person.find(); } }); and in your template you can loop over the person records and inside that loop over their respective fruits: {

Categories : Ember Js

Multiple selection in Bootstrap typeahead
I saw following has been suggested in many places: http://ivaynberg.github.io/select2/ (If you use the multi-value version.)

Categories : Javascript

Multiple Values selection in Drop DownList
[Multiple select DropDownList] http://www.codeproject.com/Articles/24205/MultiSelect-Dropdown-Control

Categories : C#

How to do multiple selection rows after insertion of NSTableVeiw
NSTableView gives you a nice API for selecting rows: selectRowIndexes:byExtendingSelection: You know which rows have been inserted, just pass along an index set of them (with a "byExtendingSelection:" parameter of "NO", if you want to create a brand new selection) and everything will be lovely.

Categories : Osx

Multiple selection of ListBox is not working in asp.net mvc4
You should bind the ListBoxFor helper to a property that is a collection of simple/scalar values such as strings or integers: public class Sample1 { [Key] public int SampleId { get; set; } public string SampleDesc { get; set; } } public class ExpModel { public List<int> SelectedSampleIds { get; set; } } and then: public ActionResult Index() { ViewData["SampleList"] = new List<Sample1>(entity.samp); return View(); } and in your view: @Html.ListBoxFor( model => model.SelectedSampleIds, new SelectList( (List<Details.Models.Sample1>)ViewData["SampleList"], "SampleId", "SampleDesc" ) ) Now when you submit the form, the SelectedSampleIds collection will contain the selected id

Categories : Asp Net Mvc

Multiple selection navigation - Small error which i cannot fix
Try add right bracket to finish this function, you have missed it o.addEventListener(MouseEvent.CLICK, gotoi); function gotoi (event:MouseEvent):void { gotoAndStop(89); oClicked = true; activateYY(); }

Categories : Actionscript

Primefaces modelling multiple selection trees
<p:dataGrid value="#{evaluationReportController.questionGroups}" var="t" styleClass="top-aligned-grid-cells" style="margin-bottom: 40px;"> <f:facet name="header">Va rugam sa bifati intrebarile</f:facet> <p:column> <p:panel header="#{t.description}"> <p:tree id="question-tree" value="#{t}" var="node" style="width: 100%" selectionMode="checkbox" selection="#{evaluationReportController.selectedQuestions[t]}"> <p:treeNode> <h:outputText value="#{node}" style="width: 120px"/> </p:treeNode> </p:tree>

Categories : Java

difficulties facing with multiple selection in listview
In your ListViewAdapter when creating view for a list item, use setTag() on the "more"-TextView to add its pr_id to it. In more's listener call getTag() to retrieve the right id.

Categories : Android

Subquery returns more than 1 value SQL error on multiple selection
You'll get your desired result with the following query SQLFIDDLE DECLARE @tblKeywords TABLE (Keyword1 VARCHAR(MAX), Keyword2 VARCHAR(MAX), Keyword3 VARCHAR(MAX)) Insert into @tblKeywords (Keyword1, Keyword2, Keyword3) select k,kk,kkk from (Select k, RowNum from (Select Keyword k, ROW_NUMBER() OVER (ORDER BY KeywordID) AS RowNum from t_SMSKeyword) as mytable where mytable.RowNum BETWEEN 1 and 3) a, (Select kk, RowNum from (Select Keyword kk, ROW_NUMBER() OVER (ORDER BY KeywordID) AS RowNum from t_SMSKeyword) as mytable where mytable.RowNum BETWEEN 4 and 6) b, (Select kkk,RowNum from (Select Keyword kkk, ROW_NUMBER() OVER (ORDER BY KeywordID) AS RowNum from t_SMSKeyword) as mytable where mytable.RowNum BETWEEN 7 and 9) c where a.RowNum = b.RowNum-3 and a.RowNum = c.RowNum-6; Sel

Categories : SQL

Mysql : SELECT multiple with different condition of selection for each
You can use a CASE expression inside of your aggregate function to convert the rows of data into columns: SELECT country, sum(case when date = 2012 then 1 else 0 end) `2012`, sum(case when date = 2013 then 1 else 0 end) `2013` FROM yourtable GROUP BY Country; See SQL Fiddle with Demo. If you have an unknown number of years, or you want to implement a range of dates, then you can use a prepared statement to generate dynamic SQL: SET @sql = NULL; SELECT GROUP_CONCAT(DISTINCT CONCAT( 'sum(CASE WHEN date = ', date, ' THEN 1 else 0 END) AS `', date, '`' ) ) INTO @sql FROM yourtable; SET @sql = CONCAT('SELECT country, ', @sql, ' from yourtable group by country'); PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE

Categories : Mysql

Sum(Case when) resulting in multiple rows of the selection
Try something like: SELECT ui.user_id, SUM(CASE WHEN date_part('year', o.time_stamp) = 2012 AND date_part('month', o.time_stamp) = 07 THEN o.amount ELSE 0 END) jul_12, SUM(CASE WHEN date_part('year', o.time_stamp) = 2012 AND date_part('month', o.time_stamp) = 08 THEN o.amount ELSE 0 END) aug_12, FROM orders o JOIN users_info ui ON ui.user_id = o.user_id WHERE user_id = '123456' GROUP BY ui.user_id; You were getting one row per order because you were grouping by o.time_stamp and timestamps are different for each order. A shorter version of query: SELECT ui.user_id, SUM(CASE WHEN date_trunc('month', o.time_stamp) = to_date('2012 07','YYYY MM') THEN o.amount END) jul_12, SUM(CASE WHEN date_trunc('month', o.time_stamp) = to_date('2012 08','YYYY MM') THEN o.amount END) aug_12, FROM order

Categories : Postgresql

How to create multiple checkbox selection in a metabox?
You need to put a value that is checked as object. If you want to set as checked, into a value you need to put checked="checked" for example: echo '<input type="checkbox" checked="checked" name="agente" value="agente"> '.$agente.'</br>'; endwhile;

Categories : Wordpress

Isotope: combination filtering + multiple selection
I could make it work but it was not as straightforward as I thought in a firts instance. I think you need to bear on mind a couple of things: If you want to use a restrictive AND condition, then I suggest don´t use the "data-filter-value" option. Instead, put your filter variables as classes. Then, you will need to fire the isotope function by yourself in the onclick event. This is because otherwise you will fire the "default" isotope function when the user clicks the button and you won´t be able to achieve the restrictive AND mentioned. In the same direction, you will need to use new variable names (so new classes) for each combination of nested filter options you are going to work with. Otherwise, I don´t see other way (at the moment) to get a restrictive AND condition. This conce

Categories : Jquery

grid view multiple row selection with pagination
I'm assuming you're using Web Forms. I think pagination in a GridView causes a post back event, which means any state that isn't in the server side is lost. You need to store which entries are checked in server state somehow (putting a Dictionary or List in the ViewState for example) either each time you check a box, or each time you page. Then, when you page, you should use the saved state to restore the check box values on the current page.

Categories : C#

Multiple radio button selection without the loading
Keep the same class name for all radio button ,and i hope left hand side question set and right hand side question set are in diff form. $('.form-radio').click(function(){ if(document.getElementById('radio1').checked && document.getElementById('radio2').checked){ $('#button3').click(); } }); It should work

Categories : Jquery

How to clear the selection of QListView when multiple items are selected?
Use void QAbstractItemView::clearSelection() [slot] to clear selection Also, all views have a selection model you can access through: QItemSelectionModel * QAbstractItemView::selectionModel() const that allows doing a lot more things selecting Look at Handling selections in item views Another thing ... #ifdef QT_NO_DEBUG means release #ifndef QT_NO_DEBUG would be debug mode, and im sure, it will not compile the code you pasted

Categories : C++

Java : Mac command key for multiple selection in a list (instead of control)
How to use Command-c/Command-v shortcut in Mac to copy/paste text? - Use this for using the command key. http://www.mkyong.com/java/how-to-detect-os-in-java-systemgetpropertyosname/ - Use this for getting the operating system.

Categories : Java

Why Listbox Multiple selection is not working on page load?
You could try it the other way around, loop all ListItems and set each Selected property: foreach(DataRow row in userinfo.Rows) { string group = row.Field<String>("GroupNumber"); string[] vals = group.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach(ListItem item in ListBox1.Items) { item.Selected = vals.Contains(item.Value); } }

Categories : C#

UITableViewCellAccessoryCheckmark multiple selection/detect which cells selected?
Your question does not relate to UITableViewCellAccessory or UITableView so the title is somewhat misleading. If I were you I would hold an NSMutableArray of selected cells as an instance variable or property. @property (nonatomic, strong) NSMutableArray *selectedCells; -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //Maybe some validation here (such as duplicates etc) ... [self.selectedCells addObject:indexPath]; } And then when done is pressed you may check this property to see which cells are selected. UPDATE: //Retrieve cell UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath]; //UITableViewCell has a textLabel property replace "yourLabel" with that if you have used it. Otherwise you can identify th

Categories : Iphone

Use Multiple sql addition,selection in same php file and return appropriate result
I think this should work. // Firstly, sanitise the input. // This is a lot easier in PDO or mysqli_* $KID = mysql_real_escape_string($KID); $SAS="SELECT MSG1 FROM `CHAT` WHERE KID='$KID'"; // run the query, or generate an error message $rowset = mysql_query($SAS) or die(mysql_error()); // Check to see if there's an entry in the database if ($row = mysql_fetch_assoc($rowset)) { echo"<br><b>"; echo $row['MSG1']; echo "</b><br>"; echo "<b>Your KID Number is</b> ".'$KID'; } else { die('No messages'); }

Categories : PHP

Why would an xpath position selection expression return multiple nodes?
Both expressions represent the first route and message child of its parent, respectively.1 All of your routes are siblings sharing a single body parent, so the first of these is returned and only that. However each route contains its own set of message children, the first of which is being returned for every route node. If you need to match the first message element in your entire XML document, use: (//message)[1] The parentheses tells the processor to find nodes matching //message, then the [1] predicate that comes after picks the first out of those nodes. Without them the [1] predicate will simply operate based on children of their parent node. 1 Because I'm a CSS selector junkie: the selector counterparts for your XPath expressions are route:nth-of-type(1) and message:nth-of-type

Categories : Xml

Not able to select multiple files in JFileChooser even with multi selection enabled
At this block: fc.showOpenDialog(null); if(fc.getApproveButtonMnemonic()==JFileChooser.APPROVE_OPTION){ files = fc.getSelectedFiles(); assert(files.length!=0); } You're comparing the Approve button Mnemonic (that could be null) with an integer constant (JFileChooser.APPROVE_OPTION). It should be: //fc.showOpenDialog(null); if(fc.showOpenDialog(null)==JFileChooser.APPROVE_OPTION){ files = fc.getSelectedFiles(); assert(files.length!=0); }

Categories : Java

Multiple, dynamic dropdown list based on user selection
Not sure where you're having trouble, but to (hopefully) point you in the right direction: You could have both of your <select> elements created on the page, with the City dropdown having the HTML disabled attribute, which will gray it out. The disabled dropdown will have no options, aside from maybe one that says something like "select state." You'll add an onchange event listener to your State dropdown which will perform the AJAX call, and I would recommend you get your response back in JSON format. Then you can clear out the options of the next dropdown and create and append the new options from your server, then enable the dropdown. If you want to provide what you've done so far, I'm sure we can help debug it.

Categories : PHP

DropDownList Multiple Selection, code only sees 1 item selected
Are you sure that the control you need to use is a listbox instead of a drop down list? http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listbox.selectionmode.aspx http://www.w3schools.com/aspnet/control_listbox.asp

Categories : C#

Jquery datepicker to show multiple color on date selection
Like this: jsFiddle example $('#dp').datepicker({ beforeShowDay: colorize }); var blueDates = ['8-5-2013', '8-14-2013', '8-21-2013']; var greenDates = ['8-15-2013', '8-22-2013']; var redDates = ['8-9-2013', '8-13-2013']; function colorize(date) { mdy = (date.getMonth() + 1) + '-' + date.getDate() + '-' + date.getFullYear(); console.log(mdy); if ($.inArray(mdy, blueDates) > -1) { return [true, "blue"]; } else if ($.inArray(mdy, greenDates) > -1) { return [true, "green"]; } else if ($.inArray(mdy, redDates) > -1) { return [true, "red"]; } else { return [true, ""]; } }

Categories : Jquery

Rules for selection an overloaded method with multiple parameters in Java
The first and the second will, but third won't (due to ambidous method call). Why java can't resolve this situation? Why not to cast #3 to #1? As you mentioned, long can be autoboxed to Long. However, there is an ambiguity here - if only the second long is autoboxed, you'd get #1. If both of them are autoboxed, you'd get #2. Since Java cannot decide which method you meant, it raises an error.

Categories : Java

SharePoint 2010: Hide multiple selection choice option
IIRC, a workflow can set a choice field to any value, even if it is not in the list of options. Just remove the "none selected" from the list of options that the user sees. Here is a screenshot of the workflow steps And here is what the form looks like. In the background you can see list items with "none selected" that was set by the workflow.

Categories : Jquery

Which preference controls whether multiple selection is available to Package Explorer in Eclipse?
After many attempts and many failures, I eventually managed to track down this problem. It seems that if the Gnome preference "Show position of pointer when the Control key is pressed" is enabled† then multi-selection fails in Eclipse. To fix it, I simply disabled "Show position of pointer when the Control key is pressed"†. † On my Red Hat Enterprise Linux 6 installation this is located in: System > Preferences > Mouse > General tab, Locate Pointer section The thing which finally gave my a hint was identifying that this was probably due to the same underlying problem as another I was having with the NoMachine NX client, where the nxclient wasn't passing Ctrl key presses to the remote end at all. See the bug report Enabling Gnome Accessibility option prevents "ctrl"

Categories : Eclipse

AngularJS pattern for persisting record selection through multiple asynchronous calls?
I think u could maintain a separate collection of selected names. So the next time you filter the list, you just need to lookup in the collection in order to keep the item selected. That you can do by binding some variable (arrSelected) in the controller or you can create a separate service also.

Categories : Angularjs

Bind IsSelected Property of ListBoxItem in ListBox with Multiple selection mode
How about creating a derived ListBox: public class MyListBox : ListBox { protected override void PrepareContainerForItemOverride( DependencyObject element, object item) { base.PrepareContainerForItemOverride(element, item); if (item is Item) { var binding = new Binding { Source = item, Path = new PropertyPath("IsSelected"), Mode = BindingMode.TwoWay }; ((ListBoxItem)element).SetBinding(ListBoxItem.IsSelectedProperty, binding); } } }

Categories : C#

Rails - Submit Values based on Multiple Selection and Text Field
All the form (POST) data can be found in the params hash. See attached links for details: http://guides.rubyonrails.org/action_controller_overview.html#hash-and-array-parameters Rails params explained?

Categories : Ruby On Rails

Changing a drop down list offering one selection option to multiple options in checkboxes
You can do this In html page with select box Replace : <select name="strFieldOfStudy_en" id="strFieldOfStudy_en"> <?php foreach ($fields_of_research as $field) { $selectedValue= ""; if ($strFieldOfStudy_en == $field['id']) $selectedValue= " selected"; echo " ".'<option value="'.$field['id'].'"'.$selectedValue.'>'.$field['field_of_research_en']." </option> "; } ?> </select> By: <?php $i = 1; foreach ($fields_of_research as $field) { $selectedValue= ""; if ($strFieldOfStudy_en == $field['id']) $selectedValue= 'checked="checked"'; echo '<checkbox id="strFieldOfStudy_en'.$i.'" name="strFieldOfStudy_en[]" value="'.

Categories : PHP

© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.