無法獲取gridview單元格的值。我綁定的GridView動態無法訪問gridview單元格值
<asp:Panel ID="PnlGrid" runat="server" ScrollBars="Both" CssClass="gridLayout">
<asp:GridView ID="grdExamReportBatchWise" runat="server" CssClass="gridReport" AutoGenerateColumns="false">
<Columns>
</Columns>
<EmptyDataTemplate>
Records not present !
</EmptyDataTemplate>
</asp:GridView>
</asp:Panel>
for (int i = 0; i < grdExamReportBatchWise.Columns.Count - 1; i++)
{
if (grdExamReportBatchWise.Rows[0].Cells[i].Text == "Paper")
{
string ne = "abc";
}
}
有什麼錯誤? – zey 2013-04-27 07:35:02
沒有任何錯誤。數據綁定完美,我只想獲取單元格中的值.. – 2013-04-27 08:14:18
,我可以更改數據但無法訪問它 – 2013-04-27 08:19:31