+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Binding to a DropDown in "User Details" when editting a user

Binding to a DropDown in "User Details" when editting a user

6 posts, 0 answered
  1. Greg Mattison
    Greg Mattison avatar
    15 posts
    Registered:
    14 Jul 2005
    18 Aug 2009
    Link to this post
    I would like to create a profile field in the User Details section of the user profile.  This field is a dropdownlist.  Everything works when a put the selecting values in the aspx, but I need to bind values to the dropdownlist.

    I have tried many different ways of finding the dropdownlist, but I can't find the control to bind to it.

    Ideally, I would like to use this custom control, but it doesn't seem to work either.  The values are chosen correctly, but when I change a value in the dropdown, the new value isn't retained.  Here is the custom control:
     public class CustomerSelectionDropDown : DropDownList 
        { 
            protected override void OnLoad(EventArgs e) 
            { 
                 
                using (ACCA.Data.ACCADataDataContext data = new ACCA.Data.ACCADataDataContext()) 
                { 
                    if (this.Items.Count == 0) 
                    { 
                        List<SmallCustomer> customerList = GetCustomerList(data); 
     
                        this.DataSource = customerList ; 
                        this.DataValueField = "CustomerID"
                        this.DataTextField = "Name"
                        this.DataBind(); 
                    } 
                    base.OnLoad(e); 
                } 
     
            } 
     


    Thanks,
    Kevin
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    19 Aug 2009
    Link to this post
    Hello Greg Mattison,

    It is not possible to use a class that inherits from DropDownList control. You should use DropDownList control.
    Below is a sample code that illustrates how to achieve this task changing the logic under Sitefinity/Admin/CmsAdmin/Users.aspx.cs:

     
        void DDBind() 
        { 
            Control container = manageUsers.GetCurrentContainer(); 
            if (container is ManageUsers.EditContainer) 
            { 
                ManageUsers.EditContainer editCont = container as ManageUsers.EditContainer; 
                ManageProfile.EditContainer editProfile = editCont.ProfileControl.Controls[0] as ManageProfile.EditContainer; 
                DropDownList combo = editProfile.GetControl<DropDownList>("MyDropDownList"false); 
                ContentManager manager = new ContentManager("News"); 
                // test data source 
                IList allItems = manager.GetContent(0, 0, string.Empty); 
                combo.Items.Clear(); 
                foreach (IContent cont in allItems) 
                { 
                    string val = (string)cont.GetMetaData("Title"); 
                    ListItem item = new ListItem(val, val); 
                    combo.Items.Add(item); 
                } 
            } 
             
        } 
     
        protected override void OnPreRender(EventArgs e) 
        { 
            base.OnPreRender(e); 
            Control container = manageUsers.GetCurrentContainer(); 
     
            if (container is ManageUsers.EditContainer) 
            { 
                ManageUsers.EditContainer editCont = container as ManageUsers.EditContainer; 
                ManageProfile.EditContainer editProfile = editCont.ProfileControl.Controls[0] as ManageProfile.EditContainer; 
                DropDownList combo = editProfile.GetControl<DropDownList>("MyDropDownList"false); 
                string username1 = manageUsers.UserName; 
                ProfileBase profile = ProfileBase.Create(username1); 
                string userValue =  (string)profile.GetPropertyValue("MyDropDownList"); 
                combo.SelectedValue = userValue; 
                
            } 
     
        } 
     
        void manageUsers_ModeChanged(object sender, EventArgs e) 
        { 
            switch (manageUsers.Mode) 
            { 
                case ManageUsers.Modes.List: 
                    this.ControlPanelTitle.InnerText = (string)GetLocalResourceObject("Users"); 
                    break
                case ManageUsers.Modes.Insert: 
                    { 
                        this.ControlPanelTitle.InnerText = String.Format("{0} > {1}", (string)GetLocalResourceObject("Users"), (string)GetLocalResourceObject("CreateNew")); 
                        SetFaqVisibility(); 
                        break
                    } 
                case ManageUsers.Modes.Edit: 
                    { 
                        DDBind(); 
                        this.ControlPanelTitle.InnerText = String.Format("{0} > {1}", (string)GetLocalResourceObject("Users"), (string)GetLocalResourceObject("Edit")); 
                        SetFaqVisibility(); 
                        break
                    } 
                case ManageUsers.Modes.Roles: 
                    this.ControlPanelTitle.InnerText = (string)GetLocalResourceObject("Roles");                 
                    break
            } 
        } 


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Greg Mattison
    Greg Mattison avatar
    15 posts
    Registered:
    14 Jul 2005
    19 Aug 2009
    Link to this post
    This solution works great when editing an existing user but fails when creating a new user.  I modified OnPreRender so it no longer errors out because it can't find the editProfile control:
                DropDownList combo; 
                if (editProfile != null
                { 
                    combo = editProfile.GetControl<DropDownList>("CustomerID"false); 
                } 
                else 
                { 
                    ManageProfile.InsertContainer insertContainer = editCont.ProfileControl.Controls[0] as ManageProfile.InsertContainer; 
                    combo = (insertContainer).GetControl<DropDownList>("CustomerID"false); 
                } 

    This Dropdown list binds perfectly, but the value is not saved.

    Any ideas?

    Thanks,
    Kevin
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    25 Aug 2009
    Link to this post
    Hello Greg Mattison,

    Modify the code as below:

     void Function() 
        { 
             
               DropDownList cont = FindControlRecursive(manageUsers, "MyDropDownList"as DropDownList; 
               ContentManager manager = new ContentManager("News"); 
               // test data source 
               IList allItems = manager.GetContent(0, 0, string.Empty); 
               cont.Items.Clear(); 
               foreach (IContent c in allItems) 
               { 
                   string val = (string)c.GetMetaData("Title"); 
                   ListItem item = new ListItem(val, val); 
                   cont.Items.Add(item); 
               } 
             
        } 
     
        void manageUsers_ModeChanged(object sender, EventArgs e) 
        { 
            switch (manageUsers.Mode) 
            { 
                case ManageUsers.Modes.List: 
                    this.ControlPanelTitle.InnerText = (string)GetLocalResourceObject("Users"); 
                    break
                case ManageUsers.Modes.Insert: 
                    { 
                        Function(); 
                        this.ControlPanelTitle.InnerText = String.Format("{0} > {1}", (string)GetLocalResourceObject("Users"), (string)GetLocalResourceObject("CreateNew")); 
                        SetFaqVisibility(); 
                        break
                    } 
                case ManageUsers.Modes.Edit: 
                    { 
                        DDBind(); 
                        this.ControlPanelTitle.InnerText = String.Format("{0} > {1}", (string)GetLocalResourceObject("Users"), (string)GetLocalResourceObject("Edit")); 
                        SetFaqVisibility(); 
                        break
                    } 
                case ManageUsers.Modes.Roles: 
                    this.ControlPanelTitle.InnerText = (string)GetLocalResourceObject("Roles");                 
                    break
            } 
        } 
     
    private Control FindControlRecursive(Control root, string id) 
        { 
            if (root.ID == id) 
            { 
                return root; 
            } 
     
            foreach (Control c in root.Controls) 
            { 
                Control t = FindControlRecursive(c, id); 
                if (t != null
                { 
                    return t; 
                } 
            } 
     
            return null
        }  

    This should bind the DropDownList control when you are creating an user.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Greg Mattison
    Greg Mattison avatar
    15 posts
    Registered:
    14 Jul 2005
    25 Aug 2009
    Link to this post
    Unfortunately, this didn't work.  Here is all my code:

    Like I said, I got it to bind to the dropdown fine.  It just isn't saving it.
    using System; 
    using System.Data; 
    using System.Configuration; 
    using System.Collections; 
    using System.Web; 
    using System.Web.Security; 
    using System.Web.UI; 
    using System.Web.UI.WebControls; 
    using System.Web.UI.WebControls.WebParts; 
    using System.Web.UI.HtmlControls; 
     
    using Telerik.Cms; 
    using Telerik.Cms.Engine; 
    using Telerik.Cms.Security; 
    using Telerik.Cms.Web; 
    using Telerik.Cms.Web.UI; 
    using Telerik.Personalization; 
    using Telerik.Web.UI; 
    using Telerik.Security; 
    using Telerik.Security.WebControls; 
    using ACCA.Web.UI; 
    using System.Web.Profile; 
     
    public partial class Admin_CmsAdmin_Users : AdminPage 
        public override string MenuItemName 
        { 
            get { return "admin_users"; } 
        } 
     
        public override int RightsRequired 
        { 
            get 
            { 
                return GlobalRights.ManageUsers; 
            } 
        } 
     
        protected override void OnInit(EventArgs e) 
        { 
            base.OnInit(e); 
            manageUsers.ModeChanged += new EventHandler(manageUsers_ModeChanged); 
            manageUsers.CreatedRole += new RoleCreatedEventHandler(manageUsers_CreatedRole); 
        } 
     
        void manageUsers_CreatedRole(object sender, GlobalPermissionsEventArgs e) 
        { 
            if (UserManager.Default.RoleProvider.Name == e.RoleProviderName) 
            { 
                GlobalPermissions.Instance.SetPermissions(e.GlobalPermissions, 0, UserManager.Default.RoleProvider.Name, new string[] { e.Role }); 
            } 
        } 
     
        protected void Page_Load(object sender, EventArgs e) 
        { 
            manageUsers.AttachCommandPanel(usersCommands); 
     
            if (!Page.IsPostBack) 
            { 
                if (Request.QueryString.Get("mode") != null 
                    && Request.QueryString.Get("mode").Equals("new")) 
                { 
                    manageUsers.Mode = ManageUsers.Modes.Insert; 
                } 
     
                if (Request.QueryString.Get("action") != null && 
                    Request.QueryString.Get("action").Equals("profile") && 
                    Request.QueryString.Get("username") != null ) 
                {  // access to profile from Newsletter groups (CMS users) 
                    string username = Request.QueryString.Get("username"); 
                    manageUsers.UserName = username;                 
                } 
                //DropDownList uxCustomers = (DropDownList)this.FindControl("manageProfile").FindControl("CustomerID"); 
            } 
            if (Membership.Providers.Count <= 1 || Roles.Providers.Count <= 1) 
            { 
                HtmlControl div = this.usersCommands.Container.FindControl("providersPanel"as HtmlControl; 
                if (div != null
                    div.Visible = false
            } 
        } 
     
        void manageUsers_ModeChanged(object sender, EventArgs e) 
        { 
            switch (manageUsers.Mode) 
            { 
                case ManageUsers.Modes.List: 
                    this.ControlPanelTitle.InnerText = (string)GetLocalResourceObject("Users"); 
                    break
                case ManageUsers.Modes.Insert: 
                    { 
                        BindForInsert(); 
                        this.ControlPanelTitle.InnerText = String.Format("{0} > {1}", (string)GetLocalResourceObject("Users"), (string)GetLocalResourceObject("CreateNew")); 
                        SetFaqVisibility(); 
                        break
                    } 
                case ManageUsers.Modes.Edit: 
                    { 
                        BindForEdit(); 
                        this.ControlPanelTitle.InnerText = String.Format("{0} > {1}", (string)GetLocalResourceObject("Users"), (string)GetLocalResourceObject("Edit")); 
                        SetFaqVisibility(); 
                        break
                    } 
                case ManageUsers.Modes.Roles: 
                    this.ControlPanelTitle.InnerText = (string)GetLocalResourceObject("Roles");                 
                    break
            } 
        } 
        private void BindForInsert() 
        { 
            DropDownList uxCustomerID = FindControlRecursive(manageUsers, "CustomerID"as DropDownList; 
            using (ACCA.Data.ACCADataDataContext data = new ACCA.Data.ACCADataDataContext()) 
            { 
                uxCustomerID.DataSource = CustomerSelectionDropDown.GetCustomerList(data); 
                uxCustomerID.DataTextField = "Name"
                uxCustomerID.DataValueField = "CustomerID"
                uxCustomerID.DataBind(); 
            } 
        } 
        private void BindForEdit() 
        { 
            DropDownList uxCustomerID = GetCustomerDropDown(); 
            if (uxCustomerID!=null
            { 
                using (ACCA.Data.ACCADataDataContext data = new ACCA.Data.ACCADataDataContext()) 
                { 
     
     
                    uxCustomerID.DataSource = CustomerSelectionDropDown.GetCustomerList(data); 
                    uxCustomerID.DataTextField = "Name"
                    uxCustomerID.DataValueField = "CustomerID"
                    uxCustomerID.DataBind(); 
                } 
            } 
        } 
        private Control FindControlRecursive(Control root, string id) 
        { 
            if (root.ID == id) 
            { 
                return root; 
            } 
     
            foreach (Control c in root.Controls) 
            { 
                Control t = FindControlRecursive(c, id); 
                if (t != null
                { 
                    return t; 
                } 
            } 
     
            return null
        }   
        protected override void OnPreRender(EventArgs e) 
        { 
            base.OnPreRender(e); 
            DropDownList combo = GetCustomerDropDown(); 
            if (combo != null
            { 
                string username1 = manageUsers.UserName; 
                ProfileBase profile = ProfileBase.Create(username1); 
                string userValue = (string)profile.GetPropertyValue("CustomerID"); 
                combo.SelectedValue = userValue; 
            } 
     
        } 
     
        private DropDownList GetCustomerDropDown() 
        { 
            Control container = manageUsers.GetCurrentContainer(); 
            DropDownList combo = null
            if (container is ManageUsers.EditContainer) 
            { 
                ManageUsers.EditContainer editCont = container as ManageUsers.EditContainer; 
                ManageProfile.EditContainer editProfile = editCont.ProfileControl.Controls[0] as ManageProfile.EditContainer; 
     
                if (editProfile != null
                { 
                    combo = editProfile.GetControl<DropDownList>("CustomerID"false); 
                } 
                else 
                { 
                    ManageProfile.InsertContainer insertContainer = editCont.ProfileControl.Controls[0] as ManageProfile.InsertContainer; 
                    combo = (insertContainer).GetControl<DropDownList>("CustomerID"false); 
                } 
            } 
            return combo; 
        }  
         
        protected void passwordRecoveryButton_Click(object sender, EventArgs e) 
        { 
            string newPassword = manageUsers.Manager.MembershipProvider.ResetPassword(manageUsers.UserName, "42"); 
            Telerik.Security.WebControls.ManageUsers.EditContainer editContainer = manageUsers.GetCurrentContainer() as Telerik.Security.WebControls.ManageUsers.EditContainer; 
            if (editContainer != null
            { 
                Control passRecovery = editContainer.FindControl("passwordRecoveryButton"); 
                if (passRecovery != null
                { 
                    int index = editContainer.Controls.IndexOf(passRecovery); 
     
                    Literal newPass = new Literal(); 
                    newPass.Text = "New password: "
     
                    Label newNote = new Label(); 
                    newNote.Controls.Add(newPass); 
                    Literal passLiteral = new Literal(); 
                    passLiteral.Text = newPassword; 
                    HtmlGenericControl strong = new HtmlGenericControl("strong"); 
                    strong.Controls.Add(passLiteral); 
     
                    newNote.Controls.Add(strong); 
     
                    editContainer.Controls.AddAt(index + 1, newNote); 
                } 
            } 
        } 
     
        private void SetFaqVisibility() 
        { 
            Control container = manageUsers.GetCurrentContainer(); 
     
            if (container == nullreturn
     
            HtmlGenericControl divFaq = container.FindControl("divFaq"as HtmlGenericControl; 
     
            if (divFaq != null
            { 
                divFaq.Visible = Telerik.Personalization.PersonalizationManager.DefaultInstance.GetGlobalValue<bool>(Telerik.Personalization.GlobalSettingConstants.ShowFaq, true); 
     
                if (divFaq.Visible) 
                { 
                    HtmlAnchor lnkHideFaq = container.FindControl("lnkHideFaq"as HtmlAnchor; 
     
                    if (lnkHideFaq != null
                    { 
                        string script = string.Format(System.Globalization.CultureInfo.CurrentCulture, "javascript:Personalization.hideFaqSection('{0}')", divFaq.ClientID); 
     
                        lnkHideFaq.Attributes.Add("onclick", script); 
                    } 
                } 
            } 
        } 


  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    26 Aug 2009
    Link to this post
    Hi Greg Mattison,

    I tried the code below and it works without problems at my end. Please check it out.

    public partial class Admin_CmsAdmin_Users : AdminPage 
        public override string MenuItemName 
        { 
            get { return "admin_users"; } 
        } 
     
        public override int RightsRequired 
        { 
            get 
            { 
                return GlobalRights.ManageUsers; 
            } 
        } 
     
        protected override void OnInit(EventArgs e) 
        { 
            base.OnInit(e); 
            manageUsers.ModeChanged += new EventHandler(manageUsers_ModeChanged); 
            manageUsers.CreatedRole += new RoleCreatedEventHandler(manageUsers_CreatedRole); 
        } 
     
        void manageUsers_CreatedRole(object sender, GlobalPermissionsEventArgs e) 
        { 
            if (UserManager.Default.RoleProvider.Name == e.RoleProviderName) 
            { 
                GlobalPermissions.Instance.SetPermissions(e.GlobalPermissions, 0, UserManager.Default.RoleProvider.Name, new string[] { e.Role }); 
            } 
        } 
     
        protected void Page_Load(object sender, EventArgs e) 
        { 
            manageUsers.AttachCommandPanel(usersCommands); 
     
            if (!Page.IsPostBack) 
            { 
                if (Request.QueryString.Get("mode") != null 
                    && Request.QueryString.Get("mode").Equals("new")) 
                { 
                    manageUsers.Mode = ManageUsers.Modes.Insert; 
                } 
     
                if (Request.QueryString.Get("action") != null && 
                    Request.QueryString.Get("action").Equals("profile") && 
                    Request.QueryString.Get("username") != null
                {  // access to profile from Newsletter groups (CMS users)  
                    string username = Request.QueryString.Get("username"); 
                    manageUsers.UserName = username; 
                } 
                //DropDownList uxCustomers = (DropDownList)this.FindControl("manageProfile").FindControl("CustomerID");  
            } 
            if (Membership.Providers.Count <= 1 || Roles.Providers.Count <= 1) 
            { 
                HtmlControl div = this.usersCommands.Container.FindControl("providersPanel"as HtmlControl; 
                if (div != null
                    div.Visible = false
            } 
        } 
     
        void manageUsers_ModeChanged(object sender, EventArgs e) 
        { 
            switch (manageUsers.Mode) 
            { 
                case ManageUsers.Modes.List: 
                    this.ControlPanelTitle.InnerText = (string)GetLocalResourceObject("Users"); 
                    break
                case ManageUsers.Modes.Insert: 
                    { 
                        BindForInsert(); 
                        this.ControlPanelTitle.InnerText = String.Format("{0} > {1}", (string)GetLocalResourceObject("Users"), (string)GetLocalResourceObject("CreateNew")); 
                        SetFaqVisibility(); 
                        break
                    } 
                case ManageUsers.Modes.Edit: 
                    { 
                        BindForEdit(); 
                        this.ControlPanelTitle.InnerText = String.Format("{0} > {1}", (string)GetLocalResourceObject("Users"), (string)GetLocalResourceObject("Edit")); 
                        SetFaqVisibility(); 
                        break
                    } 
                case ManageUsers.Modes.Roles: 
                    this.ControlPanelTitle.InnerText = (string)GetLocalResourceObject("Roles"); 
                    break
            } 
        } 
        private void BindForInsert() 
        { 
            DropDownList uxCustomerID = FindControlRecursive(manageUsers, "MyDropDownList"as DropDownList; 
            ContentManager manager = new ContentManager("News"); 
            // test data source  
            IList allItems = manager.GetContent(0, 0, string.Empty); 
            uxCustomerID.Items.Clear(); 
            foreach (IContent c in allItems) 
            { 
                string val = (string)c.GetMetaData("Title"); 
                ListItem item = new ListItem(val, val); 
                uxCustomerID.Items.Add(item); 
            }  
        } 
        private void BindForEdit() 
        { 
     
            DropDownList uxCustomerID = GetCustomerDropDown(); 
            if (uxCustomerID != null
            { 
               ContentManager manager = new ContentManager("News"); 
                 //test data source 
                IList allItems = manager.GetContent(0, 0, string.Empty); 
                uxCustomerID.Items.Clear(); 
                foreach (IContent cont in allItems) 
                { 
                    string val = (string)cont.GetMetaData("Title"); 
                    ListItem item = new ListItem(val, val); 
                    uxCustomerID.Items.Add(item); 
                } 
            } 
        } 
        private Control FindControlRecursive(Control root, string id) 
        { 
            if (root.ID == id) 
            { 
                return root; 
            } 
     
            foreach (Control c in root.Controls) 
            { 
                Control t = FindControlRecursive(c, id); 
                if (t != null
                { 
                    return t; 
                } 
            } 
     
            return null
        } 
        protected override void OnPreRender(EventArgs e) 
        { 
            base.OnPreRender(e); 
            DropDownList combo = GetCustomerDropDown(); 
            if (combo != null
            { 
                string username1 = manageUsers.UserName; 
                ProfileBase profile = ProfileBase.Create(username1); 
                string userValue = (string)profile.GetPropertyValue("MyDropDownList"); 
                combo.SelectedValue = userValue; 
            } 
     
        } 
     
        private DropDownList GetCustomerDropDown() 
        { 
            Control container = manageUsers.GetCurrentContainer(); 
            DropDownList combo = null
            if (container is ManageUsers.EditContainer) 
            { 
            ManageUsers.EditContainer editCont = container as ManageUsers.EditContainer; 
            ManageProfile.EditContainer editProfile = editCont.ProfileControl.Controls[0] as ManageProfile.EditContainer; 
                if (editProfile != null
                { 
                    combo = editProfile.GetControl<DropDownList>("MyDropDownList"false); 
                } 
                else 
                { 
                    ManageProfile.InsertContainer insertContainer = editCont.ProfileControl.Controls[0] as ManageProfile.InsertContainer; 
                    combo = (insertContainer).GetControl<DropDownList>("MyDropDownList"false); 
                } 
            } 
            return combo; 
        } 
     
        protected void passwordRecoveryButton_Click(object sender, EventArgs e) 
        { 
            string newPassword = manageUsers.Manager.MembershipProvider.ResetPassword(manageUsers.UserName, "42"); 
            Telerik.Security.WebControls.ManageUsers.EditContainer editContainer = manageUsers.GetCurrentContainer() as Telerik.Security.WebControls.ManageUsers.EditContainer; 
            if (editContainer != null
            { 
                Control passRecovery = editContainer.FindControl("passwordRecoveryButton"); 
                if (passRecovery != null
                { 
                    int index = editContainer.Controls.IndexOf(passRecovery); 
     
                    Literal newPass = new Literal(); 
                    newPass.Text = "New password: "
     
                    Label newNote = new Label(); 
                    newNote.Controls.Add(newPass); 
                    Literal passLiteral = new Literal(); 
                    passLiteral.Text = newPassword; 
                    HtmlGenericControl strong = new HtmlGenericControl("strong"); 
                    strong.Controls.Add(passLiteral); 
     
                    newNote.Controls.Add(strong); 
     
                    editContainer.Controls.AddAt(index + 1, newNote); 
                } 
            } 
        } 
     
        private void SetFaqVisibility() 
        { 
            Control container = manageUsers.GetCurrentContainer(); 
     
            if (container == nullreturn
     
            HtmlGenericControl divFaq = container.FindControl("divFaq"as HtmlGenericControl; 
     
            if (divFaq != null
            { 
                divFaq.Visible = Telerik.Personalization.PersonalizationManager.DefaultInstance.GetGlobalValue<bool>(Telerik.Personalization.GlobalSettingConstants.ShowFaq, true); 
     
                if (divFaq.Visible) 
                { 
                    HtmlAnchor lnkHideFaq = container.FindControl("lnkHideFaq"as HtmlAnchor; 
     
                    if (lnkHideFaq != null
                    { 
                        string script = string.Format(System.Globalization.CultureInfo.CurrentCulture, "javascript:Personalization.hideFaqSection('{0}')", divFaq.ClientID); 
     
                        lnkHideFaq.Attributes.Add("onclick", script); 
                    } 
                } 
            } 
        } 

    If the problem persists you could attach it to a debugger and see whether the problem comes form at your end.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
6 posts, 0 answered