-1
GridView에 "Weightage"라는 열이 있습니다. "total"이라고하는 gridview 외부에있는 텍스트 상자가 있습니다.이 텍스트 상자를 열 Weightage 바로 아래에 정렬하려고합니다. 뒤에Rowbound 이벤트에서 GridView 열의 너비를 가져 오는 방법은 무엇입니까?
</asp:GridView>
<div>
<span id="q1totalweightage" runat="server">Total<asp:TextBox ID="txtq1totalweightage" runat="server" ></asp:TextBox></span>
</div>
코드 :
protected void grvGoals_RowDataBound1(object sender, GridViewRowEventArgs e)
{
switch (e.Row.RowType)
{
case DataControlRowType.DataRow:
q1totalweightage.Attributes.Add("style", "margin-left: " + e.Row.Cells[0].Width + "px;");
break;
}
참고 : 내가 어떤 이유로 바닥 글에서이 전체 텍스트 상자를 배치 할 수 있다고 가정합니다.