Click here to Skip to main content
15,891,798 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I had 3 rows in tbody of HTML table. I want to bind data retrieved from Sharepoint list to these table row by row. But its binding data to only last row.

What I have tried:

$('#TblLineUp tbody > tr').each(function () { 
	    	
			        $(this).find('select').text(LineUpDieNo);	       
			        $(this).find("#txtSetNo1").val(LsetNo);			
				$(this).find("#txtQty1").val(LQty);
			        $(this).find("#txtRecut1").val(LRecut);
			        $(this).find("#txtNitrided1").val(LNitrided);
	        	});
Posted
Updated 21-May-17 0:31am

1 solution

Hi you need to remove > sign

$('#TblLineUp tbody tr').each(function () { 
	    	
			        $(this).find('select').text(LineUpDieNo);	       
			        $(this).find("#txtSetNo1").val(LsetNo);			
				$(this).find("#txtQty1").val(LQty);
			        $(this).find("#txtRecut1").val(LRecut);
			        $(this).find("#txtNitrided1").val(LNitrided);
	        	});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900