제 경우에는 백엔드에서 일부 데이터를 가져옵니다.자바 스크립트와 ASP.NET
그리드 뷰의 한 특정 열을 숨겨야합니다. 화면에 나타나서는 안됩니다. 예를 들어 use visible = "false"인 경우 이벤트를 클릭 할 때 데이터가 표시되지 않습니다. 텍스트 상자에서이 작업을 수행하는 방법을 알려주세요.
소스 코드 :
는<asp:BoundField DataField="GLAC_NAME" HeaderText="A/cNo">
<ItemStyle Width="200px" />
</asp:BoundField>
내가 사용자에게 표시하지 않아야 숨길 수있는이 특별한 열은
코드는 시작 : 여기
protected void GridLedger_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onMouseDown", "var str = document.getElementById('" + e.Row.ClientID + "').cells[1].innerText; document.getElementById('"+TextBox1.ClientID+"').value = str;");
}
}
catch (System.Exception ex)
{
throw ex;
}
}
이 코드이 시작될 내가 셀 값으로 언급해야 함
어떤 열입니까? 그것은 이드 칼럼인가 .... –