We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DropDownList with item check all

Thread ID:

Created:

Updated:

Platform:

Replies:

120720 Oct 8,2015 10:44 AM UTC Oct 9,2015 10:36 AM UTC ASP.NET Web Forms 1
loading
Tags: DropDownList
Manolo
Asked On October 8, 2015 10:44 AM UTC

Hi,

I want an element "check all" inside the dropdownlist items.

I've done this:

<ej:DropDownList ID="ddlGrupoOS" runat="server" SelectMethod="GetGruposOS" DataTextField="Nombre" DataValueField="ID" OnDataBinding="ddlEstadoOS_DataBinding" ></ej:DropDownList>

.....

<script>
        function onCheckUncheckAll(args) {
            if (args.value == "0") {
                var sender = $('#<%=ddlGrupoOS.ClientID%>').data("ejDropDownList");
                if (args.isChecked)
                    sender.checkAll();
                else
                    sender.unCheckAll();
            }
        }
<script>

Code Behind

public IEnumerable<GrupoOS> GetGruposOS()
        {
            DMOperaciones db = new DMOperaciones();
            var result = db.GetGruposOS().OrderBy(x => x.ID).ToList();;
            result.Insert(0, new GrupoOS() { ID = 0, Nombre = "Check all" });
            return result;
        }

I need this "property" in a lot of dropdown list. I think that it could be better done, but I don't know

Thanks

Kasithangam C [Syncfusion]
Replied On October 9, 2015 10:36 AM UTC

Hi Manolo,

Currently we don’t have inbuilt functionality for adding check all element in DropDownList items .You can add checkall element in your desire dropdownlist items after achieving this behavior. You could use the code that you have mentioned in your query. We have logged defect report for this. A support incident to track the status of this issue has been created under your account. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents  


Regards,

Kasithangam


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;