0

我正在尝试在面板内务实地添加 listfielditerator 控件。下面是我的示例代码。

ListFieldIterator spCtrls = new ListFieldIterator();
        spCtrls.ID = "lstfields";
        spCtrls.ControlMode = SPControlMode.Edit;
        spCtrls.ListId = listId;
        spCtrls.ItemId = itemid;
        spCtrls.TemplateName = "ListFieldIterator";
        pnlSPCtrl.Controls.Add(spCtrls);

        SaveButton btnSave = new SaveButton();
        btnSave.ID = "bs";
        btnSave.ControlMode = SPControlMode.Edit;
        btnSave.ListId = listId;
        btnSave.ItemId = itemid;
        pnlFooter.Controls.Add(btnSave);

        DeleteItemButton btnDelete = new DeleteItemButton();
        btnDelete.ID = "bd";
        btnDelete.ControlMode = SPControlMode.Edit;
        btnDelete.ListId = listId;
        btnDelete.ItemId = itemid;
        pnlFooter.Controls.Add(btnDelete);

列表中的所有控件都在呈现。但是,当我尝试在 peoplepicker 控件中搜索和添加用户时,出现错误:

The target 'ctl00$PlaceHolderMain$lstfields$ctl04$ctl00$ctl00$ctl04$ctl00$ctl00$UserField' for the callback could not be found or did not implement ICallbackEventHandler.

另外,当我尝试选择标签时,我的分类字段会被挂起。

知道我哪里出错了吗?

谢谢, 马利卡君

4

0 回答 0