OnClientColorChange get_selectedColorTitle returns null

3 posts, 0 answers
  1. moegal
    moegal avatar
    273 posts
    Member since:
    Jul 2007

    Posted 14 Aug 2014 Link to this post

    Help!!

    OnClientColorChange
    sender.get_selectedColorTitle()  returns null

    sender.get_selectedColor() works fine. And when I hover on a color chip it displays the color title just fine.

    I am using the color picker with custom color list that I have set the in code behind like so:

    RadColorPicker rcp = new RadColorPicker();
                    rcp.ID = "colorsId";
                    rcp.CssClass = "cFieldRight idcolorsId";
                    //rcp.ToolTip = "Select GARMENT COLOR CHOICES";
                    rcp.EnableViewState = false;
                    rcp.Preset = ColorPreset.None;
                    rcp.ShowIcon = false;
                    rcp.ShowEmptyColor = false;
                    rcp.PreviewColor = false;
                    //rcp.Columns = 15;
                    rcp.OnClientColorChange = "$.pc5.Colors_OnClientColorChange";
     
                    foreach (DataRow dataRow in dt.Rows)
                    {
                        string colorName = (string)dataRow["Name"];
                        string colorValue = (string)dataRow["ItemColor"];
                        ColorPickerItem item = new ColorPickerItem();
                        item.Title = colorName;
                        item.Value = ColorTranslator.FromHtml(colorValue);
                        rcp.Items.Add(item);
                    }
     
                    rcp.SelectedColor = ColorTranslator.FromHtml("#FFFFFF");
                    ph.Controls.Add(rcp);


    Thanks, Marty
  2. Slav
    Admin
    Slav avatar
    1355 posts

    Posted 18 Aug 2014 Link to this post

    Hello,

    I created a sample page from the code snippet you provided and tried to reproduce the described problem, but to no avail. Please check the attached sample page and compare it to your actual project. If there are differences in the setup, describe them so that I can change my test page accordingly. You can also modify the attached page so that the problem is reproducible and send it for further inspection.

    Regards,
    Slav
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. moegal
    moegal avatar
    273 posts
    Member since:
    Jul 2007

    Posted 19 Aug 2014 Link to this post

    Slav,

    Thanks I am looking at your example now.

    Marty
Back to Top