jQWidgets Forums

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts

  • jamieoro
    Participant

    Hi Peter.

    Can I set the certain value to be selected in City? For example, user selects France in Country, Paris will be set and selected in City.

    $("#jqxgrid").on('cellendedit', function(event) {
       var editingFields = event.args.datafield;
    
       if(editingFields == 'Country')
       {
         var selectedValue = event.args.value;
         var rowIndex = event.args.rowindex;
    				
         if(selectedValue == 'France')
         {
    	$("#jqxgrid").jqxGrid('setcellvalue', rowIndex, 'City', 'Paris');
         }
      }
    });

    City is set to Paris but when user clicks on City, Paris is not selected.

    Thanks!

Viewing 1 post (of 1 total)