Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7672437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:17:07+00:00 2026-05-31T16:17:07+00:00

I am new to jQuery and attempting to use the dropdownchecklist control I am

  • 0

I am new to jQuery and attempting to use the dropdownchecklist control

I am populating the select element from an asp.NET sqldatasource. However, I would also like the list to have an option for “Select All” as the first option, so that in jquery I can use the “firstItemChecksAll” in junction with the first option in the list (that is appropriately named “Select All” because thats what will happen when its clicked).

Is adding this element in addition to databinding possible (without adding a row to my db called “Select All”)? How do I accomplish this? I dont see AppendDataBoundItems as an option in the select element (I assume because its an html and not an asp.net control).

Here is what my code looks like now (I havent put the jquery code in yet)…

<select id="testBuSelect" multiple="true" runat="server" DataSourceID="BusinessUnitDataSource" 
                    DataTextField="BUSINESS_UNIT_NAME" DataValueField="BUSINESS_UNIT_CODE"></select>
<asp:SqlDataSource ID="BusinessUnitDataSource" runat="server"
                    SelectCommand = "SELECT BUSINESS_UNIT_CODE, BUSINESS_UNIT_NAME FROM BUSINESS_UNIT ORDER BY BUSINESS_UNIT_CODE">
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T16:17:08+00:00Added an answer on May 31, 2026 at 4:17 pm

    Try using AppendDataBoundItems see – http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listcontrol.appenddatabounditems.aspx. Something like this:

    <asp:DropDownList
        ID="testBuSelect"
        multiple="true"
        runat="server"
        AppendDataBoundItems="true"
        DataSourceID="BusinessUnitDataSource" 
        DataTextField="BUSINESS_UNIT_NAME"
        DataValueField="BUSINESS_UNIT_CODE">
            <asp:ListItem>Select All</asp:ListItem>
    </asp:DropDownList>
    
    <asp:SqlDataSource
        ID="BusinessUnitDataSource"
        runat="server"
        SelectCommand = "SELECT BUSINESS_UNIT_CODE, BUSINESS_UNIT_NAME FROM BUSINESS_UNIT    ORDER BY BUSINESS_UNIT_CODE" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first time attempting to call an ASP.NET page method from jQuery.
I'm attempting to use NextGen Gallery plugin with the new jquery slideshow plugin GalleryView.
I'm new to jQuery, but just attempting to create a function I can use
I'm pretty new to JQuery Datatables, I'm attempting to retrieve two information about the
I've been trying to use the new jquery-ui, and all but the resizable function
Example: var $doesNotYetExistInTheDOM = $('<span/>'); // create new jQuery element // outside of the
I'm attempting to use jQuery to do a $.post() to an MVC controller action.
I am attempting to use the jCorner plugin for jQuery, but falling down at
I am attempting to implement a tagging system into my asp.net MVC project. When
I am attempting to use AJAX in jQuery to load content to a div,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.