I am looking to add custom properties to a tool part. I've been able to add the textbox as desired. I've been able to enter values and display it in the webpart.
The problem is when I edit the webpart - the panel pops up but the control I added is not populated with the previously entered value. See below:
I have followed the instructions on this website exactly as written - neither myself nor a more experienced Sharepoint developer co-worker is able to figure out what's going on here.
We thought that overriding the SyncChanges() method would allow for this - It seems it doesn't, unless our implementation isn't correct?
public override void SyncChanges()
{
DemoWebPart wp = (DemoWebPart)this.ParentToolPane.SelectedWebPart;
urls.Text = wp.ListValue;
}
We have also prefixed the urls property of the DemoWebPart.cs class with the following, to no avail:
[Browsable(true), Category("Miscellaneous"),
DefaultValue("Site Names"),
WebPartStorage(Storage.Shared / Personal / None),
FriendlyName("URLs"), Description("Text Property")]
(Having tried Storage.Shared, Storage.Personal, and Storage.None).
Any help you can provide would be greatly appreciated - thanks in advance!