jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList jqxdropdownlist popup issue

This topic contains 4 replies, has 2 voices, and was last updated by  09097037 12 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • jqxdropdownlist popup issue #13655

    09097037
    Participant

    Hi ,

    I am using jqxdropdownlist inside jqxgrid as a columntype. i am populating the data in dropdownlist dynamically from another jqxgrid.getrows … when i am trying to open the dropdownlist , its taking 3-4 clicks to open the dropdown. how can i make it visible and also should open on 1 click. here is the sample code i am using.

    // Start – Route and assignedPod Grid
    source1 = {
    localdata:data.routeList,
    datatype: “array”,
    datafields: [
    {name: ‘routeID’},
    {name: ‘podName’}
    ],
    id: ‘id’
    //url: ‘routeData.txt’
    };
    var dataAdapter1 = new $.jqx.dataAdapter(source1);

    //Create Route jqxGrid
    $(“#jqxRouteGrid”).jqxGrid(
    {
    width: 400,
    source: dataAdapter1,
    columnsresize: true,
    theme: themeobj,
    selectionmode: ‘singlecell’,
    height: 180,
    editable: true,
    //showfilterrow: true,
    //filterable: true,
    scrollable :true,
    scrollbarsize: 10,
    altrows: true,
    columns: [
    { text: ‘Route Number’, filtercondition: ‘starts_with’, datafield: ‘routeID’, width: 200 },
    { text: ‘POD Assigned’, columntype: ‘dropdownlist’, datafield: ‘podName’, width: 182,
    scrollBarSize:5,
    createeditor: function (row, column, editor) {
    $(“#”+column).css(‘z-index’, 9999999999);
    editor.jqxDropDownList({source: dropDownList,autoOpen: true,animationType: ‘none’});

    $(editor).bind(‘open’, function (event) {
    //var ds = $(‘#jqxPodGrid’).jqxGrid(‘getrows’);
    //alert(ds);
    editor.jqxDropDownList({source: dropDownList,autoOpen: true,animationType: ‘none’});
    });
    },
    cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    saveState();//($(“#jqxPodGrid”).jqxGrid(‘exportdata’, ‘json’),$(“#jqxRouteGrid”).jqxGrid(‘exportdata’, ‘json’));
    if (newvalue == “”) return oldvalue;
    }
    }
    ]
    });

    thanks

    Naseer

     

    jqxdropdownlist popup issue #13658

    Peter Stoev
    Keymaster

    Hi Naseer,

    Thanks for writing.

    jqxDropDownList should not be populated with data when the Popup is opened. In the provided code, you will change the widget’s data source each time the popup is opened.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxdropdownlist popup issue #13664

    09097037
    Participant

    Hi Peter,

    thanks for replying. I do have the business requirement that when ever jqxgrid1 changes, its data need to populate in the dropdownlist. so i am trying to achieve this while a user try to open the dropdownlist. if this is not proper, can you please help me providing better solution.

    thanks
    naseer

    jqxdropdownlist popup issue #13665

    Peter Stoev
    Keymaster

    Hi naseer,

    The jqxDropDownList’s “source” should be updated only in the “createeditor” callback function as you have already done that. In case you wish to update the data source each time the editor needs to be displayed, use the “initeditor” callback instead.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxdropdownlist popup issue #13716

    09097037
    Participant

    Hi Peter,

    thanks for the suggestion. I implemented it and its working better than before. Can you please give me some sample code line where the dropdownlist will be visible in the jqxgrid column. currently in jqxgrid the dropdownlist is invisible, user has to click 2 times to make it visible and then select the options.

    thanks
    Naseer

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

You must be logged in to reply to this topic.