jQWidgets Forums

jQuery UI Widgets Forums Grid Drop down exhibiting odd behaviors in select event

This topic contains 4 replies, has 2 voices, and was last updated by  Hristo 6 years, 9 months ago.

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

  • CXXXV
    Participant

    I have the following code:

    		columns: [
    			{ text: 'RIDER',  datafield: 'NAME', columntype: 'dropdownlist', width: 200,
    			
    				createeditor: function (row, value, editor) {editor.jqxDropDownList({source: ridAdapter, displayMember: 'RINAME', valueMember: 'RIID' })	
    
    							editor.on('select', function (event) {
    							
    								data = $("#transGrid").jqxGrid('getrowdata',row);
    								console.log(data.TID);
    								console.log(args.item.value);
    							}); 
    						}				
    
    				},	

    The issues are as follows:

    1 – The event fires mutiple times. When selecting the cell, when opening the drop down and when selecting an item. Why is that. Supposed to only fire after selecting an item.

    2 – The value of row does not change making it impossible to obtain proper row data. Furthermore, when selecting another row the event display multiple values from the previous rows.

    So, all I need is the new value of the item selected and the row data of the selected row. I have tested the examples and the same thing happens.


    Hristo
    Participant

    Hello CXXXV,

    I tested this example and it seems to work fine.
    In this example are implemented change and select events.
    It demonstrates how depends on the value in one cell that will reflect into the next one.
    The “change” event is used for the purpose of the demo because it is fired when already one item is chosen.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    CXXXV
    Participant

    You did not answer my question.

    I need the rowdata when the dropdown is closed. Or the dropdown value when cellendedit.


    CXXXV
    Participant

    I made a work around. Not pretty however. The DROPDOWN select should also have the rowindex as part of the args.


    Hristo
    Participant

    Hello CXXXV,

    In the example that I provided you the select event is fired just once.
    I assume that this case has been resolved?

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.