Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By Zora99
#825731
How to unset required field inside a grid based on dropdown value?
Code: Select all
function set_jenis_dokumen(){
  var aGridVals = $('#allItem').getValue();
	//loop through grid
    for (var i = 1; i <= aGridVals.length; i++) {
      var jenis_dokumen = $("#allItem").getValue(i, 25);
      if(jenis_dokumen == 4){
        $("#allItem").getControl(i, 26).showColumn();
        $("#allItem").getControl(i, 27).showColumn();
        $("#allItem").getControl(i, 28).hideColumn();
        $("#allItem").getControl(i, 26).attr("disabled", false);
        $("#allItem").getControl(i, 27).attr("disabled", false);
        $("#allItem").getControl(i, 28).attr("disabled", true);
      }else if(jenis_dokumen == 3){
        $("#allItem").getControl(i, 26).showColumn();
        $("#allItem").getControl(i, 27).showColumn();
        $("#allItem").getControl(i, 28).hideColumn();
        $("#allItem").getControl(i, 26).attr("disabled", false);
        $("#allItem").getControl(i, 27).attr("disabled", false);
        $("#allItem").getControl(i, 28).attr("disabled", true);
      }
      else if(jenis_dokumen == 2){
        $("#allItem").getControl(i, 26).showColumn();
        $("#allItem").getControl(i, 27).showColumn();
        $("#allItem").getControl(i, 28).showColumn();
        $("#allItem").getControl(i, 26).attr("disabled", false);
        $("#allItem").getControl(i, 27).attr("disabled", false);
        $("#allItem").getControl(i, 28).attr("disabled", false);
      }
      else if(jenis_dokumen == 1){
       	$("#allItem").getControl(i, 26).hideColumn();
        $("#allItem").getControl(i, 27).hideColumn();
        $("#allItem").getControl(i, 28).hideColumn();
        $("#allItem").getControl(i, 26).attr("disabled", true);
        $("#allItem").getControl(i, 27).attr("disabled", true);
        $("#allItem").getControl(i, 28).attr("disabled", true);
      }
    }
}

Web3 development encompasses creating decentralize[…]

The Upland Clone Script, offered by Dappsfirm, rep[…]

Dappsfirm offers a bet365 clone script that mirror[…]

🚀 Tauchen Sie mit Immediate Alora AI in die Welt d[…]