I want to customize a SharePoint
EntityEditorWithPicker so that I can open the picker dialog through a linkbutton. When the user closes the dialog, I want to update the page with the selected values (the results go in rows of custom controls)
This would be the current state of the picker control, with a textbox and the "adressbook" button to open the picker dialog. The resolved result ends up in the textbox
But I want the dialog to open from the linkbutton called "Add Multiple Records". Afterwards I want to handle the results in some sort of callback function.
The above picture represents a custom class derived from
EntityEditorWithPicker that I use to let users pick custom data.
The linkbutton is added to a custom control from code behind, there's no aspx or CAML involved. I thought i might add the results to the hidden field I insert together with the button, here's the part of the control that outputs that area.
HiddenField hiddenElement = new HiddenField(); hiddenElement.ID = "hiddenResultElement"; container.Controls.Add(hiddenElement); LinkButton button = new LinkButton(); button.Text = "Add multiple records"; button.CommandName = "InsertMultiple"; table.Rows.Cells.Controls.Add(image); // plus sign table.Rows.Cells.Controls.Add(button);
I would like to be able to use the linkbutton to open the browse-dialog of the entitypicker, and handle the results using a callback function