0
jQuery를 사용하여 ajax 호출 JSON에서 매개 변수로 GridView DataKey (기본 키)를 전달해야합니다.Jquery ajax call pass GridView DataKey
그러나 소스 코드 HTML에서 기본 키 열을 노출시키지 않습니다. 이미 테이블의 TD (첫 번째 열)를 숨기려고했지만 소스 코드에서 숨길 수는 없습니다.
$(function(){
$("tr").each(function(){//hide primary key columns in design
$("td:first",this).hide();
$("th:first",this).hide();
});
$("tr:not(:first)").click(function(){
$.ajax({
type:"POST",
url:"CRUDWeb.asmx/DeleteRow",
data:"{'duviID': '" + $(this).children("td:first").html() + "'}",//get primary key
contentType:"application/json; charset=utf-8",
dataType:"json",
success:function(){},
error:function(rh){alert(rh.responseText);}
});
});
});
어떤 아이디어 : 여기
는 jQuery 코드인가?