2010-06-18 6 views
0

GridView의 마지막 열 이외의 모든 열에 대해 click 이벤트를 찾고 GridView의 마지막 열 (DropDownList)에 대한 별도의 click 이벤트를 찾고 있습니다. 나는 지금 다음했지만 그냥 마지막 열 제외 얻이 수없는 것 :jQuery 필터링 Gridview 열

var _activeRow; 
$('.gridview-jquerify tr').filter(function() { 
    return $('td', this).length && !$('table', this).length 
}) 
.bind('click', function(e) { 
    if (_activeRow) _activeRow.removeClass('gridviewrow-highlighted'); 
    _activeRow = $(this).addClass('gridviewrow-highlighted'); 
    $(this).each(function() { 
      var myID = $(this).find('.gridview-cell-hide').html(); 
     __doPostBack('MyUpdatePanel', myID); 
    }); 
}); 

그런 다음 나는를 수행하여 마지막 열 작동 위의 변화를 얻을 수없는 것을 마지막 선택에서 같은 : 사용하여 필터링

$('.gridview-jquerify tr >td:last').filter(function() { 
    return $('td)', this).length && !$('table', this).length 
}) 

답변

1
//Selects all but last column 

$(".gridview-jqueryify tr td:not(:last-child)") 

//Selects last column 

$(".gridview-jqueryify tr td:last-child") 
+0

감사합니다. – RSchmitt

0

완벽한 확장 당신이 상상할 수있는만큼 간단한 크롬 콘솔에 jQuery를 포함 할 수 있습니다. 이 확장은 jQuery가 이미 페이지에 삽입 된 경우에도 무효화됩니다.

이 확장 프로그램은 jQuery를 원하는 페이지에 삽입하는 데 사용됩니다. 콘솔 셸에서 jQuery를 사용할 수 있습니다 ("Ctrl + Shift + j"로 Chrome 콘솔을 호출 할 수 있음).

선택한 탭에 jQuery를 포함 시키려면 확장 버튼을 클릭하십시오.

링크 연장 : https://chrome.google.com/extensions/detail/gbmifchmngifmadobkcpijhhldeeelkc