jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList jqxdropdownlist autoClose

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

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
  • jqxdropdownlist autoClose #8312

    damc
    Participant

    Hi,

    Is it possible to set the drop-down(jqxDropDownList) is automatically closed when the mouse cursor is moved from the widget (it closes like with autoOpen property but opens on click)?

    Thank you for your help.

    jqxdropdownlist autoClose #8313

    Peter Stoev
    Keymaster

    Hi damc,

    You can achieve that with a combination of the jqxDropDownList’s ‘open’, ‘close’ events and the ‘autoOpen’ property.

    Example:

                  $("#jqxWidget").bind('open', function () {
    $("#jqxWidget").jqxDropDownList({ autoOpen: true });
    });
    $("#jqxWidget").bind('close', function () {
    $("#jqxWidget").jqxDropDownList({ autoOpen: false });
    });

    Hope this helps.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxdropdownlist autoClose #8314

    damc
    Participant

    Hi,

    Thanks. I will try.

    I have multiple jqxdropdownlist on page and if user opens one and select another drop-down, first stays open (NOT OK). If user select input field it closes (OK). Is this normally that it works like I write it?

    Thank you for your help.

    jqxdropdownlist autoClose #8315

    Peter Stoev
    Keymaster

    Hi damc,

    Do you initialize them from class or by id? The expected initialization is by Id.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxdropdownlist autoClose #8316

    damc
    Participant

    Hi Peter,

    I initialize them by id.

    jqxdropdownlist autoClose #8317

    Peter Stoev
    Keymaster

    Hi damc,

    Do you use the latest version – jQWidgets 2.4.2? In addition, could you send us a sample which demonstrates the behavior to support@jqwidgets.com?

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxdropdownlist autoClose #8323

    damc
    Participant

    Hi Peter,

    I use jQWidgets 2.4.2.

    My code:

    jQuery('#jqxDropDownList1').jqxDropDownList({
    source : dataAdapter,
    selectedIndex : 1,
    animationType : 'none',
    width : '149',
    height : '22',
    dropDownWidth : '700',
    displayMember : 'dis1',
    valueMember : 'val',
    disabled : false
    });
    source = {
    localdata : self.myData.arrayA,
    datatype : 'local'
    };
    dataAdapter = new jQuery.jqx.dataAdapter(source);
    jQuery('#jqxDropDownList1').jqxDropDownList({
    source : dataAdapter,
    selectedIndex : 1,
    animationType : 'none',
    width : '149',
    height : '22',
    dropDownWidth : '700',
    displayMember : 'dis1',
    valueMember : 'val',
    disabled : false
    });
    source = {
    localdata : self.myData.arrayB,
    datatype : 'local'
    };
    dataAdapter = new jQuery.jqx.dataAdapter(source);
    jqxdropdownlist autoClose #8324

    Peter Stoev
    Keymaster

    Hi damc,

    I don’t understand your code. You have 2 identical initializations for 1 DIV tag with id = jqxDropDownList1. If you want to create multiple DropDownLists, you need to add DIV tags with unique IDs to your web page.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxdropdownlist autoClose #8358

    damc
    Participant

    Hi Peter,

    Sorry. I mistyped.

    My code:

    jQuery('#jqxDropDownList1').jqxDropDownList({
    source : dataAdapter,
    selectedIndex : 1,
    animationType : 'none',
    width : '149',
    height : '22',
    dropDownWidth : '700',
    displayMember : 'dis1',
    valueMember : 'val',
    disabled : false
    });
    source = {
    localdata : self.myData.arrayA,
    datatype : 'local'
    };
    dataAdapter = new jQuery.jqx.dataAdapter(source);
    jQuery('#jqxDropDownList2').jqxDropDownList({
    source : dataAdapter,
    selectedIndex : 1,
    animationType : 'none',
    width : '149',
    height : '22',
    dropDownWidth : '700',
    displayMember : 'dis1',
    valueMember : 'val',
    disabled : false
    });
    source = {
    localdata : self.myData.arrayB,
    datatype : 'local'
    };
    dataAdapter = new jQuery.jqx.dataAdapter(source);

    Thank you.

    jqxdropdownlist autoClose #8361

    Peter Stoev
    Keymaster

    Hi damc,

    You will have to remove the animationType setting, because the reported issue is related to that.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxdropdownlist autoClose #8369

    damc
    Participant

    Hi Peter,

    If I remove animationType setting it works. Have you plan to solve this issue in next version?

    Thank you.

    jqxdropdownlist autoClose #8370

    Peter Stoev
    Keymaster

    Hi damc,

    Yes, of course. The reported issue will be resolved in the next version.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxdropdownlist autoClose #47872

    dloo
    Participant

    This is still happening for me: the jqxdropdownlist stays open while I switch jqxTabs. I dont want to use autoOpen.

    I am running jqwidgets 3.0.4

    // Create a jqxDropDownList
    $(‘#jqxDDDayListsd’).jqxDropDownList({ source: [“1 Day”,”2 Days”,”3 Days”, “4 Days”, “5 Days”, “6 Days”, “7 Days”],
    theme: theme,
    selectedIndex: 0,
    width: ’70px’,
    height: ’25px’,
    dropDownHeight: 180 });

    Thanks
    David

    jqxdropdownlist autoClose #47875

    Peter Stoev
    Keymaster

    Hi David,

    Use the “close” method if you want to close the widget’s DropDown.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxdropdownlist autoClose #47880

    dloo
    Participant

    How do I detect that my mouse has moved away from the widget in order for me to call the “close” method ?

    Thanks
    David

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.