jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList How we can change jqxDropdown placeholder

This topic contains 6 replies, has 2 voices, and was last updated by  Peter Stoev 11 years, 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • How we can change jqxDropdown placeholder #46468

    Narendra
    Participant

    Hi,

    I am using jqxdropdown, I want to customize the default selection ‘Please Choose’ as ‘Select Page’ or ‘Select

    City’ like that, how can I achieve it..

    Please give me quick reply..

    Thanks in advance ..

    How we can change jqxDropdown placeholder #46470

    Narendra
    Participant

    place Holder is not working for me..

    How we can change jqxDropdown placeholder #46473

    Peter Stoev
    Keymaster

    Hi Narendra,

    Below is a working sample:

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta name="keywords" content="jQuery DropDownList, List, ListBox, Popup List, jqxDropDownList, jqxListBox, List Widget, ListBox Widget, DropDownList Widget" />
        <meta name="description" content="The jqxDropDownList represents a widget that contains a list of
            selectable items displayed in a drop-down." />
        <title id='Description'>The jqxDropDownList represents a widget that contains a list
            of selectable items displayed in a drop-down.</title>
        <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
        <script type="text/javascript" src="../../scripts/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="../../scripts/demos.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 source = [
                        "Affogato",
                        "Americano",
                        "Bicerin",
                        "Breve",
                        "Café Bombón",
                        "Café au lait",
                        "Caffé Corretto",
                        "Café Crema",
                        "Caffé Latte",
                        "Caffé macchiato",
                        "Café mélange",
                        "Coffee milk",
                        "Cafe mocha",
                        "Cappuccino",
                        "Carajillo",
                        "Cortado",
                        "Cuban espresso",
                        "Espresso",
                        "Eiskaffee",
                        "The Flat White",
                        "Frappuccino",
                        "Galao",
                        "Greek frappé coffee",
                        "Iced Coffee",
                        "Indian filter coffee",
                        "Instant coffee",
                        "Irish coffee",
                        "Liqueur coffee"
    		        ];
    
                    // Create a jqxDropDownList
                    $("#jqxWidget").jqxDropDownList({placeHolder: 'hello', source: source, width: '200', height: '25'});
                });
            </script>
            <div id='jqxWidget'>
            </div>
        </div>
    </body>
    </html>
    

    If the above does not work for you, then I would suggest you to use the most recent version – 3.0.4. The sample above works with it and we have not tested it with previous versions.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    How we can change jqxDropdown placeholder #46475

    Narendra
    Participant

    Hi Thank for your quick reply,

    I am using jquery-1.6.min.js, But in the above example you used the jquery-1.10.2.min.js, But in the past

    we purchased license for [jqwidgets-ver2.6.0] and we are using those controls in our project, and now that placeHolder

    property is not working for jqxdropdownlist. What I have to do now..

    Please Give me Quick reply..

    Thanks in advance…

    How we can change jqxDropdown placeholder #46477

    Peter Stoev
    Keymaster

    Hi Narendra,

    The jQuery version is not much important and the placeHolder property works as expected. See the code which I posted. If you use jQWidgets ver. 3.0.4, it will work. I am not sure whether there’s a placeHolder property in previous versions.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    How we can change jqxDropdown placeholder #46479

    Narendra
    Participant

    Hi Peter,

    Thanks for your quick reply..

    I found that there is no such property (placeHolder) for jqxDropdownList in the version which we have already purchased.

    And now If I replaced these all New version in my project, may be the UI will change and functionality will be distrub.

    What I have to do now..

    Please give me suggestion..

    How we can change jqxDropdown placeholder #46480

    Peter Stoev
    Keymaster

    Hi Narendra,

    There are a lot of changes since 2.6.0(Dec-27-2012) and multiple Breaking changes and API changes since then. For more information visit: Release Notes. If you upgrade only to use one new property which is not available in the version that you use, then may be it is a better idea to customize the widget’s code.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.