我正在尝试在面板中实用地添加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.
另外,当我尝试选择标签时,我的分类字段会被挂起。
知道我哪里出错了吗?
谢谢, Mallikarjun