jQuery UI Widgets Forums Lists ComboBox Get datafields other-than Display and Value Members

This topic contains 1 reply, has 2 voices, and was last updated by  Hristo 7 years, 5 months ago.

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

  • supun151515
    Participant

    Hi,
    I want to retrieve 3 (ID, Name, Mobile) dataFields from the database. When user selects one item, another textbox should display Mobile Number.

    datafields: [
                            { name: 'ID' },
                            { name: 'Name' },
                            { name: 'mobile' }
                        ], 
    
     $(".select_client").jqxComboBox({ selectedIndex: 0, source: dataAdapter, displayMember: "Name", valueMember: "ID", width: 240, height: 25});
                    // trigger the select event.
                    
    
      $('.select_client').on('select', function (event) 
                        {
                            var args = event.args;
                            if (args) {                       
                            var index = args.index;
                            var item = args.item;
                            var label = item.label;
                            var value = item.value;
                            
    
                            console.log(item.mobile);
                          
                        }
        }); 

    Hope you understand


    Hristo
    Participant

    Hello supun151515,

    You could use the DataAdapter and when the select event is fired can get records from the DataAdapter.
    Also, you could use this demo as a base.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.