Foros del Web » Programando para Internet » Javascript » Frameworks JS »

Agregar fila a tabla tipo arbol, sin ocupar treeTable

Estas en el tema de Agregar fila a tabla tipo arbol, sin ocupar treeTable en el foro de Frameworks JS en Foros del Web. Estimados; quiero agregar filas dinamicas, pero debajo de la fila que selecciono, algo así como tipo arbol. Encontré un codigo jquery, pero me agrega las ...
  #1 (permalink)  
Antiguo 21/11/2011, 12:34
Avatar de franfritz  
Fecha de Ingreso: marzo-2003
Ubicación: Stgo Chile
Mensajes: 260
Antigüedad: 21 años
Puntos: 0
Agregar fila a tabla tipo arbol, sin ocupar treeTable

Estimados; quiero agregar filas dinamicas, pero debajo de la fila que selecciono,
algo así como tipo arbol.

Encontré un codigo jquery, pero me agrega las filas al final.

Código:
function agrega_fila(){

	var n = $('tr:last td', $("#tabla_id")).length;
	var tds = '<tr>';
		for(var i = 0; i < n; i++){
			tds += '<td>nuevo</td>';
		}
			tds += '</tr>';
			
	$("#tabla_id").append(tds);		
}

A ver si me pueden ayudar. No quiero ocupar treeTable; ya que la tabla se va poblando a medida que seleccionan.
De antemano gracias.

Etiquetas: jquery
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 10:32.