.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

selected option items in (multi-) select box on ASP pages are not highlighted if the select box is d

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :ASP.Net

Dear community,

I've an asp application with vbs using input forms containing select objects with the property "multiple" specified. If the select object is disabled, the selected option items aren't highlighted. This behaviour occurs with IE8 and also with IE9. In earlier versions of IE everything worked fine. You can reproduce that also with a simple HTML page like:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<Select style='width:200;height=200' disabled multiple>
 <option selected>option1</option>
 <option selected>option3</option>
 <option selected>option5</option>

<Select style='width:200;height=200' multiple>
 <option selected>option1</option>
 <option selected>option3</option>
 <option selected>option5</option>



Is there a workaround for that?

Thanks in advance!


View Complete Post

More Related Resource Links

Values in multiselect dropdown not getting selected when Select All option is selected


Values in multiselect dropdown not getting selected when Select All option is selected for a SSRS dropdown.

There are multiple dropdowns on the page. We have one dropdown whose output is being used to populate the second dropdown using a stored procedure. When we check the Select All checkbox on the dropdown then ideally upon page refresh all the values should get selected in the dropdown, but in this case the page refreshes back to the blank dropdown, forcing the user to select the values again. The next dropdown too does not get populated. This makes it impossible to run the report for all the cases by using Select All.

We ran the report on differnet database environments. My current location is Mumbai,India, the report worked fine when we ran it on a Bangalore,india database. This issue occurs when we try running it on a Chicago database server.

I am using SSRS 2005, SQL2005.

If anybody has faced such an issue earlier, please help me out here.  Thank you. 


Items that I select in design view are not being highlighted in source view


I'm using Visual Studio 2008, and when I select/highlight something in design view and switch to source view it does not highlight and scroll to the selected item. This makes it really hard to change stuff in source view, and it's very inconvenient at worst. Any ideas? 

How to multi select items in WPF Treeview using Shift Button


I have a requirement where i have to create a WPF Treeview, bind it to a dataset.
Then i have to provide functionality for user to select nodes either using Ctrl or multi select using Shift button.

I am able to write code to do all the tasks above except multi select using Shift button.
Following is my XAML for Treeview.

<TreeView Name="tvOutput" ItemsSource="{Binding}" Height="200" VerticalAlignment="Top" MouseMove="tvOutput_MouseMove" DragLeave="treeView_DragLeave" SelectedItemChanged="Tree_SelectedItemChanged">
                                <!-- This Style binds a TreeViewItem to a Node. -->
                                <Style TargetType="{x:Type TreeViewItem}">
                                    <Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
                                    <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
                                        <Trigger Property="IsEnabled" Value="True">
                                            <Setter Prop

Multi-Select with NULL option?



Using SSRS 2005 I have a detail report that takes three parameters.  Two are date parameters and are not a problem.  I use the third parameter as a lookup for a staff ID.  I have it setup as a multi-value, allowing blanks and pulls from a data set.  This basically works, however sometimes this field is left blank in the database set as NULL.

To also capture the NULL records I have the following in the WHERE clause of the dataset query:

AND (staff.staff_id IN (@staffid) OR staff.staff_id IS NULL)

The trouble with this is that if someone selects a sub set of the staff IDs the records with staff ID = NULL always gets reported too.  I would like to change this so that if you select a specific staff ID only

Treeview: Select all children if Parent is selected etc...



I'm using a Treeview with  ShowCheckBoxes="All" , so basically I have a tree with all CheckBox Nodes. I'm using the TreeView inside an update panel, and populate the Tree code behind dynamically.

My requrements are the following:

1) Select all the children if parent is selected,

2) When parent is selected, and if we de-select a child, set parent unselected

3) Track if new nodes were selected and previously selected nodes were de-selected (becasue I need to update the database according to the selections in the Tree)

For above 1, I do the following:

protected void TreeView1_TreeNodeCheckChanged(object sender, TreeNodeEventArgs e)
        foreach (TreeNode node in TreeView1.Nodes)
            TreeNodeCollection col = node.ChildNodes;
            //select all children when the parent is checked
            if (col != null && node.Checked)

Use BDC data in list as multi-select column

I have a document library that uses values from another system for its metadata.  Right now, we copy the values from the primary system into SharePoint so users can choose them.  I want to find a way to use the BDC connection that I have set up to automatically pull those values.  The problem is that the current metadata is set to multi-select.  So, I have a file that is in the library and it can be used for multiple clients - clients is a column in my library and users can select many entries.  When I set up a column to pull BDC data, it only allows single entry.  Does anyone have any ideas?

select of X items in a single field

Hi! I've a select like this:select fieldA,fieldBfrom tablebut fieldB must be a list of items of another table:something like this:select fieldA, (select itemA from table2 where idref = table.id) AS fieldB from tableI need to show in fieldB a list of items (X records) returned from my second SELECT with a "-" for separate X fieldsI should show in fielB this:itemA - itemB - item C - item Dis it possible?Thanks

DVWP connections with multi-select lookup columns

I have a question concerning the Data View Web Part using SharePoint Designer 2007.   I have two list (A and B). List A has a lookup column (called B-items) with multiple selections to items in List B(using the Title column from B).   I create a web part page and insert a data view of using List A. I create another data view with data from List B. Next, I make a Web Part Connection between the two data views with A passing B-items column as parameter to List B data view. I then create a filter on the List B data view with a comparison of List B’s Title column equal to the parameter of List A’s B-items value when a user selects an item from List A data view. The problem is nothing appears in List B’s data view.   When I try the reverse of the above scenario it works fine.     I understand that this is properly functionality, but is there a way to achieve my first scenario? If so, how can it be accomplished?   I have looked through the web for help and found the answer here http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/749b7477-f37f-4724-94b3-b6ace770e73a seems to be what I’m looking for. However, I am unsure how to implement his code into the web part page.   I am a worse than a novice with xsl so if anyone gives an example I would greatly appreciate step by step on what code is needed a

NULL label doesn't appear on drop down or multi-select parameter.

Hi, I am using SSRS 2005 SP3. I have the following query that I use for my parameter: SELECT 0 AS c1, 'NOT Specified' AS c2 UNION SELECT 1 AS c1, NULL AS c2 UNION SELECT 2 AS c1, 'Test 1' AS c2 UNION SELECT 3 AS c1, 'Test 2' AS c2 Let's call my parameter prm1. The type of prm1 is string and it has "Allow null value" and "Allow blank value" options ticked. C1 is the value field and C2 is the label field for prm1. When I preview the report, and I didn't see NULL in my drop down list,  but that record has been shown as 1 (which is the value). I am wondering if this is a normal behavior of SSRS? It's not a big deal. I can replace NULL with something else, but I am just curious. Cheers, Uzzie

ReportViewer 2008 multi-select parameter alignment

We are using SSRS 2008 SP1 & ReportViewer 2008 SP1. The multi-select parameter options are left aligned in the drop-down listbox on the Report Server but when run thru ASP.Net & reportViewer, they are aligned in the center of the drop-down list. This is very problematic because the width of the drop-down is also narrow compared to the text size of the fields. I tried wrapping the ReportViewer in a Div tag (<div style="vertical-align: left; text-align: left">), but still no joy.  Would appreciate any help thanks.

Multi select control does not work with Infopath. :(

I create new lookup column that allows multiple values.  The important part is the column is the Title(linked to item) so the item is shown as Hyperlink item to the actual item.  This works fine, but then I would like to fine tune my form with infopath.  When I open this form it complains about these columns, basically will not let me open the form without first deleting these lookup columns.  So I then try the other way I create a lookup column from infopath and this work fine, the only problem being is these items no longer so up as hyperlinks to the original items.  This is a major bumma, any one have any suggestions to get this working?

Multivalue parameters - Changing label if (Select All) is selected

I'm using SSRS 2005.  I have a report which has a multi value parameter.  When you click (Select All) the text in the parameter combobox shows all the names of the possible values.  Since this is my default it really looks tacky and hard to read. Is there a way I can have the text in the multi value parameter combobox say "ALL" or something else when (Select All) is checked?  

Multi Select Sorting help

I need help with a bit complex JavaScript. This is what I am trying to do: I have a database table with id and title. I am populating the multi select list with the values "id + title" (ex: 1234 Title1) What I need to do is sort the list based on the items selected. There is a sort button which when a user clicks after selecting his titles should push the selected items to the top of the list and sorted and the list that's not selected must also be sorted based on the title. For ex if I have these in the select list:my options will look like this <option value="122" id="001">122 Amazing Facts</option><option value="890" id="002">890 Famous Seven</option><option value="345" id="003">345 Niagara Falls</option>......<option value="100" id="007">100 Zimbabwe</option>122 Amazing Facts 890 Famous Seven 345 Niagara Falls 879 Spain Champions 865 Trinidad & Tobago 213 Victoria Falls100 Zimbabwe They are all sorted on the title (or the ID since I am populating them based on the titles). This will be the first pass when I populate them. Now the user selects 890 Famous Seven, 213 Victoria Falls, 100 Zimbabwe and hits the sort button. The result should look like this 890 Famous Seven 213 Victoria Falls 100 Zimbabwe 122 Amazing Facts 345 Niagara Fa

Form Display is very slow to display, (using large multi-select lists)

Hi, I am looking for some suggestions on how to speed up a few very slow forms. We have created some Leaver and Joiner type forms for our IT guys. They contain some lookup data , and we need to pick multiple values from a hidden list. Unfortunately this (Systems/Roles) list is large (3000 rows and growing). On a couple of forms there are 2 of these multi-select boxes, and things are getting pretty slow to display. Any suggestions? ---------- Background Info / things I have tried: The forms are based on Site content types and Site Columns. A set of 5 Combo boxes is slower than one Multi-select list. SPDesigner is available but I do not have Central Admin rights I am not alowed to write/install custom code on the server. (Visual Studio code / Codeplex code / extra Features etc) :-( I have had to resize the Multi-select list, so am using the SPServices JQuery call to make the multi-select box wide enough for the text. But this is extra overhead so I might have to back that out / replace with a fixed width for the multiselect box (if I can find it's id, so I can do that in Javascript). Filtering the Multi-select box is possible, but only after the page has initially loaded (it seems) (again I tried the SPServices Jquery call) The Company intend to add more Content types, so I am trying to avoid a custom Newform.aspx for each type (Leaver / New Joiner / Transfer/ C

API SSRS 2008 for php multi-select

Hi, I use API SSRS 2008 for php .  We have create with a report builder  a report to use multi-select. In the manager web SSRS we can use  multi-select filter option. But with API i don't see the possibility to use multi-select. Is-it possible ? Regards Marc       

Configuring ObjectDataSource not giving me option to select correct TableAdapter

So, I have 3 table adapters in my dataset, and trying to configure the objectDataSource will not give me the option to select the correct table adapter.I set up a temporary website to illustrate what I am talking about, along with pics, not much, just 4 pics.https://sites.google.com/site/configuringobjectdatasource/The first 2 pics are irrelevant but just in case anyone thinking I don't have it set up properly. The other table adapters are working fine, which I have gridviews being populated etc.Anyways, anyone have any idea why it will not give me the option to select aspnet_GetRecordDatesTableAdapter?

How to set items from Select Command in Data Source to populate textboxes


I need to know how to get the  items from a Select Command in a Data Source to populate textboxes. For instance in the Select statement below I want to set the textbox for First Name equal to the item in the Select Command highlighted below:


 Protected Sub MHGrid_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles MHGrid.SelectedIndexChanged
        Me.Table1.Visible = True

        Me.txtFirstName.Text = (1)

    End Sub


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend