嘿我尝试根据转发器内的项目数合并单元格,但在检查item.count时,我总是得到0。
for (int i = 0; i < repLoans.Items.Count; i++)
{
HtmlTableCell operations2 = (HtmlTableCell)repLoans.Items[i].FindControl("operations2");
operations2.Attributes.Add("style", "display:none");
}
for (int i = 0; i < repLoans.Items.Count; i++)
{
HtmlTableCell loansKreditor = (HtmlTableCell)repLoans.Items[i].FindControl("ve_loansKreditor");
loansKreditor.Attributes.Add("colspan", "2");
}
这是我如何通过细胞。