Essential Studio for Asp.Net | Demos

SHOWCASE SAMPLES
Showcase samples
    <%@ Page Language="C#" Title="DropDownList-Integration with Widgets-ASP.NET-SYNCFUSION" AutoEventWireup="true" MasterPageFile="~/Samplebrowser.Master" CodeBehind="IntegrationwithWidgets.aspx.cs" Inherits="WebSampleBrowser.DropDownList.IntegrationwithWidgets" %>
    
    
    <asp:Content ID="Content2" ContentPlaceHolderID="ControlsSection" runat="server">
    
        <div class="frame">
            <div class="control">
                <ej:DropDownList ID="selectFolder" runat="server" WatermarkText="Select any value" Width="100%" ClientSideOnCreate="dropdownOnCreate">
                    <Items>
                        <ej:DropDownListItem>
                            <ContentTemplate>
                                <ej:TreeView ID="Treeview" runat="server" DataTextField="Text" DataIdField="ID" DataParentIdField="ParentID"
                                    DataHasChildField="HasChild" ClientSideOnCreated="treeViewOnCreate" ClientSideOnNodeExpanded="checkScroll" ClientSideOnNodeChecked="onNodeCheck" ClientSideOnNodeUnchecked="onNodeUnCheck" ShowCheckbox="true" ClientSideOnNodeCollapsed="checkScroll">
                                </ej:TreeView>
                            </ContentTemplate>
                        </ej:DropDownListItem>
                    </Items>
                </ej:DropDownList>
            </div>
        </div>
    
    </asp:Content>
    
    <asp:Content ID="Content6" ContentPlaceHolderID="StyleSection" runat="server">
        <style type="text/css">
            .desig {
                font-weight: normal;
                padding-left: 5px;
            }
    
            .cont {
                font-size: 10px;
                font-weight: normal;
                padding-left: 5px;
            }
    
            .eimg {
                margin: 0;
                padding: 2px;
                float: left;
                border: 0 none;
                width: 50px;
                height: 50px;
            }
    
            .ename {
                padding-left: 5px;
                font-weight: bold;
            }
            .e-treeview > ul {
                margin-left: 0 !important;
            }
    
            .e-ddl-popup div > ul li .e-chkbox-wrap {
                padding-right: 2px;
            }
    
            .e-ddl-popup div > ul .e-ghead {
                display: none !important;
            }
    
            .frame {
                width: 30%;
            }
        </style>
    </asp:Content>
    <asp:Content ID="ScriptContent" ContentPlaceHolderID="ScriptSection" runat="server">
          <script type="text/javascript">
    
              ej.DropDownList.prototype._OnMouseClick = function (e) { }
              ej.DropDownList.prototype._OnMouseEnter = function (e) { }
              ej.DropDownList.prototype._OnMouseLeave = function (e) { }
              ej.DropDownList.prototype._OnKeyUp = function (e) { }
              ej.DropDownList.prototype._OnKeyDown = function (e) { }
    
        </script>
         <script src='<%= Page.ResolveClientUrl("~/Scripts/DropDownList/IntegrationwithWidgets.js")%>' type="text/javascript"></script>
    </asp:Content>
    
    
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.ComponentModel;
    
    namespace WebSampleBrowser.DropDownList
    {
        public partial class IntegrationwithWidgets : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                this.Treeview.DataSource = new TreeIconsDataSource().GetTreeIconItems().ToList();
            }
        }
        public class TreeIconsDataSource
        {
    
            public TreeIconsDataSource()
            { }
            public TreeIconsDataSource(int _id, int _parentid, string _text, string _hasChild, string _expanded, string _spriteCssClass)
            {
                this.ID = _id;
                this.ParentID = _parentid;
                this.Text = _text;
                this.HasChild = _hasChild;
                this.Expanded = _expanded;         
            }
            [Browsable(true)]
            public int ID
            {
                get;
                set;
            }
    
            [Browsable(true)]
            public int ParentID
            {
                get;
                set;
            }
    
            [Browsable(true)]
            public string Text
            {
                get;
                set;
            }
            [Browsable(true)]
            public string HasChild
            {
                get;
                set;
            }
            [Browsable(true)]
            public string Expanded
            {
                get;
                set;
            }
            [Browsable(true)]
            public string SpriteCssClass
            {
                get;
                set;
            }
    
            public List<TreeIconsDataSource> GetTreeIconItems()
            {
                List<TreeIconsDataSource> data = new List<TreeIconsDataSource>();
                data.Add(new TreeIconsDataSource(1, 0, "Mail", "true", "true", "mailicon sprite-root"));
                data.Add(new TreeIconsDataSource(2, 1, "Inbox ", "true", "", "mailicon sprite-inbox"));
                data.Add(new TreeIconsDataSource(3, 2, "Development ", "", "", "mailicon sprite-folder"));
                data.Add(new TreeIconsDataSource(4, 2, "Supports", "", "", "mailicon sprite-folder"));
                data.Add(new TreeIconsDataSource(20, 2, "Management", "", "", "mailicon sprite-folder"));
                data.Add(new TreeIconsDataSource(21, 2, "Team Meeting", "", "", "mailicon sprite-folder"));
                data.Add(new TreeIconsDataSource(6, 1, "Drafts", "true", "", "mailicon sprite-drafts"));
                data.Add(new TreeIconsDataSource(7, 6, "Support template ", "", "", "mailicon sprite-folder"));
                data.Add(new TreeIconsDataSource(8, 6, "Personal ", "", "", "mailicon sprite-folder"));
                data.Add(new TreeIconsDataSource(9, 1, "Sent items ", "true", "", "mailicon sprite-sentitems"));
                data.Add(new TreeIconsDataSource(10, 9, "Support ", "", "", "mailicon sprite-folder"));
                data.Add(new TreeIconsDataSource(22, 9, "HTML JS ", "", "", "mailicon sprite-folder"));
                data.Add(new TreeIconsDataSource(24, 1, "Deleted ", "", "", "mailicon sprite-deleted"));
                data.Add(new TreeIconsDataSource(25, 1, "Junk Mails ", "", "", "mailicon sprite-junk"));
                data.Add(new TreeIconsDataSource(26, 1, "Peronal ", "true", "", "mailicon sprite-folder"));
                data.Add(new TreeIconsDataSource(27, 26, "HR Team ", "", "", "mailicon sprite-folder"));
                data.Add(new TreeIconsDataSource(28, 26, "My Works ", "", "", "mailicon sprite-folder"));
                data.Add(new TreeIconsDataSource(29, 26, "Login details ", "", "", "mailicon sprite-folder"));
                data.Add(new TreeIconsDataSource(11, 0, "Calendar", "true", "", "mailicon sprite-calendar"));
                data.Add(new TreeIconsDataSource(12, 11, "My Calendar ", "", "", "mailicon sprite-calendar"));
                data.Add(new TreeIconsDataSource(13, 11, "Team", "", "", "mailicon sprite-calendar"));
                data.Add(new TreeIconsDataSource(14, 11, "Others", "", "", "mailicon sprite-calendar"));
                data.Add(new TreeIconsDataSource(15, 0, "Notes", "true", "", "mailicon sprite-notes"));
                data.Add(new TreeIconsDataSource(16, 15, "My Reference ", "", "", "mailicon sprite-folder"));
                data.Add(new TreeIconsDataSource(30, 0, "Contacts", "true", "", "mailicon sprite-contacts"));
                data.Add(new TreeIconsDataSource(31, 30, "Suggested", "", "", "mailicon sprite-contacts"));
                data.Add(new TreeIconsDataSource(32, 30, "MY Team", "", "", "mailicon sprite-contacts"));
                
    
                return data;
            }
        }
    }