Solved

How to split a string in a column and have it show up in the search drop down box at the footer search box.

Posted on 2014-04-23
1
215 Views
Last Modified: 2014-05-13
take this example here: http://www.datatables.net/examples/api/multi_filter_select.html, now suppose i want to keep Win 98+ / OSX.2+ show up in the platform column but underneath in the drop down box I want it to show Win 98+  in one row and OSX.2+ in the other.
0
Comment
Question by:cbrune
1 Comment
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 40018604
I wouldn't do a 2nd row.  But you can add on to the select in the function fnCreateSelect.  I have a working example here http://jsbin.com/woyem/1/edit. You can either hard code it or generate via your serverside code.  You can also adjust how the data is pulled for the drop down and just use the first 3 letters.

	
			function fnCreateSelect( aData )
			{
				var r='<select><option value=""></option>', i, iLen=aData.length;
				for ( i=0 ; i<iLen ; i++ )
				{
					r += '<option value="'+aData[i]+'">'+aData[i]+'</option>';
				}
// ADD VIA SERVER SIDE CODE or HARD CODE
              r += '<option value="Win">Win</option>'
              r += '<option value="OSX">OSX</option>'
				return r+'</select>';
			}
			

Open in new window

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question