jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList place Holder not changed

This topic contains 4 replies, has 3 voices, and was last updated by  wavetrex 12 years ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • place Holder not changed #20316

    Mhanna AbuTareef
    Participant

    Hi,
    Also when added to the constructor, still not changed.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta name="keywords" content="jQuery DropDownList, List, ListBox, Popup List, jqxDropDownList, jqxListBox, List Widget, ListBox Widget, DropDownList Widget" />
    <meta name="description" content="This demo shows how to display items in groups by setting each jqxDropDownList item's group property."/>
    <title id='Description'>This demo shows how to display items in groups by setting each jqxDropDownList item's group property.</title>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/gettheme.js"></script>
    <script type="text/javascript" src="../../scripts/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script>
    </head>
    <body>
    <div id='content'>
    <script type="text/javascript">
    $(document).ready(function () {
    var theme = getDemoTheme();
    var source = [
    // Business & Investing
    {html: "<div style='padding: 1px;'><div>Title: Do the Work</div><div>Author: Steven Pressfield</div></div>", title: "Do the Work", group: "Business & Investing" },
    { html: "<div style='padding: 1px;'><div>Title: Think and Grow Rich</div><div>Author: Napoleon Hill</div></div>", title: "Think and Grow Rich", group: "Business & Investing" },
    { html: "<div style='padding: 1px;'><div>Title: The Toyota Way to Continuous...</div><div>Author: Jeffrey K. Liker</div></div>", title: "The Toyota Way to Continuous...", group: "Business & Investing" },
    { html: "<div style='padding: 1px;'><div>Title: Redesigning Leadership </div><div>Author: John Maeda</div></div>", title: "Redesigning Leadership ", group: "Business & Investing" },
    // Computer & Internet Books
    {html: "<div style='padding: 1px;'><div>Title: MacBook Pro Portable Genius</div><div>Author: Brad Miser</div></div>", title: "MacBook Pro Portable Genius", group: "Computer & Internet Books" },
    { html: "<div style='padding: 1px;'><div>Title: Social Media Metrics Secrets</div><div>Author: John Lovett</div></div>", title: "Social Media Metrics Secrets", group: "Computer & Internet Books" },
    { html: "<div style='padding: 1px;'><div>Title: iPad 2: The Missing Manual</div><div>Author: J D Biersdorfer J.D</div></div>", title: "iPad 2: The Missing Manual", group: "Computer & Internet Books" },
    // History
    {html: "<div style='padding: 1px;'><div>Lincoln and His Admirals</div><div>Author:Craig L. Symonds</div></div>", title: "Lincoln and His Admirals", group: "History" },
    { html: "<div style='padding: 1px;'><div>The Dogs of War: 1861</div><div>Author:Emory M. Thomas</div></div>", title: "The Dogs of War: 1861", group: "History" },
    { html: "<div style='padding: 1px;'><div>Cleopatra: A Life</div><div>Author:Stacy Schiff</div></div>", title: "Cleopatra: A Life", group: "History" },
    { html: "<div style='padding: 1px;'><div>Mother Teresa: A Biography</div><div>Author:Meg Greene</div></div>", title: "Mother Teresa: A Biography", group: "History" },
    { html: "<div style='padding: 1px;'><div>The Federalist Papers</div><div>Author:John Jay</div></div>", title: "The Federalist Papers", group: "History" },
    ];
    // Create a jqxDropDownList
    $("#jqxWidget").jqxDropDownList({ source: source, width: '300', height: '35', theme: theme});
    $("#jqxWidget").jqxDropDownList({placeHolder: "Select:"});
    });
    </script>
    <div id='jqxWidget'>
    </div>
    </div>
    </body>
    </html>
    place Holder not changed #20322

    Peter Stoev
    Keymaster

    Hi,

    Which version of jQWidgets do you use? It is possible the property to be not available in your version if you do not use the latest one.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    place Holder not changed #20378

    Mhanna AbuTareef
    Participant

    Hi,
    I’m using version 2.8.
    Tested on chrome Version 26.0.1410.64 m and also on IE 10. And in Both it’s not working.

    place Holder not changed #20379

    Peter Stoev
    Keymaster

    Hi,

    The current version is not 2.8.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    place Holder not changed #23167

    wavetrex
    Participant

    I have experienced the same thing in 2.8.3.
    Simply setting another “placeHolder” value doesn’t refresh/redraw the DropDownList.

    $(“#jqxWidget”).jqxDropDownList({placeHolder: “Select:”}); // would be doing nothing

    In my case however, I found a workaround. By specifying the “source” to the DropDownList again, the entire thing is refreshed, so the new placeHolder is considered and displayed:

    var source = new $.jqx.dataAdapter({ … });

    // when generating the control:

    $(“#jqxWidget”).jqxDropDownList({
    source: source,
    width: 300,
    // … etc, other parameters
    };

    // when changing the placeHolder

    $(“#jqxWidget”).jqxDropDownList({
    placeHolder: “New placeholder”,
    source: source
    });


    This works !
    Good luck

    p.s. – It’s really a bug, we shouldn’t need to force other values in order to change the placeholder…

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.