循环通过转发器内的对象,这些对象位于表内并合并单元格

时间:2017-06-20 11:51:49

标签: c# asp.net

嘿我尝试根据转发器内的项目数合并单元格,但在检查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");
    }

这是我如何通过细胞。

0 个答案:

没有答案