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 leydyzapata03
#794062
Buen día, tengo lo siguiente: Una grilla donde en una columna esta el nombre de personas y en otras columnas checkbox
Lo que necesito es que al darle en el boton agregar me plasme en otra grid en la primera columna el nombre de la persona y el check que haya seleccionado; estó sólo se debe hacer si hay selección en el checkbox, adicional si por persona hay más de un checkbox que en la grilla donde plasmo la información se repita la persona por check seleccionado.
Attachments
grid.PNG
Adjunto form
grid.PNG (53.77 KiB) Viewed 2379 times
By cpomares
#814240
Hi leydyzapata03,
i think you want to accomplish a result similar to this:

This is the first grid with the name and the checkboxes:
Selection_005.png
Selection_005.png (16.91 KiB) Viewed 2070 times
This is the second grid with the names and the labels of the checkboxes checked by user.
Selection_006.png
Selection_006.png (13.17 KiB) Viewed 2070 times
what i did was in a first task fill the values of the first grid, names and checkboxes. Then on a second dynaform i loaded the first grid and using JQuery i populated the second grid, here is the code i used:
Code: Select all
var j=1;
for(var i=1;i<=$("#gridVar004").getNumberRows();i++){
var name=$("#gridVar004").getValue(i,1);
	if ($("#gridVar004").getValue(i,2)=="1"){
		var check="Errors";
      	if(j>1)$("#gridVar005").addRow();
       	$("#gridVar005").setValue(name,j,1);
      	$("#gridVar005").setValue(check,j,2);
      	j++;
	}
	if ($("#gridVar004").getValue(i,3)=="1"){
		var check="AHT";
      	if(j>1)$("#gridVar005").addRow();
      	$("#gridVar005").setValue(name,j,1);
      	$("#gridVar005").setValue(check,j,2)
      	j++;
	}
	if ($("#gridVar004").getValue(i,4)=="1"){
		var check="ADH";
      	if(j>1)$("#gridVar005").addRow();
      	$("#gridVar005").setValue(name,j,1);
      	$("#gridVar005").setValue(check,j,2)
      	j++;
	}
	if ($("#gridVar004").getValue(i,5)=="1"){
		var check="ATT";
      	if(j>1)$("#gridVar005").addRow();
      	$("#gridVar005").setValue(name,j,1);
      	$("#gridVar005").setValue(check,j,2)
      	j++;
	}
}
Hope you find it useful, regards
Carlos
What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]