Monday, June 21, 2010

Microsoft.SharePoint.WebPartPages.ToolPart , page needs a refresh to apply changes back to web part

Hi

 

I have a problem with custom tool part. The page needs a refresh before the changes are actually visible in the web part.

Either user have to hit apply then OK in Tool Part, or after directly hitting Ok he needs to refresh the page.

 

Seems to be create child control of web part  being called before applychanges of tool part.

 

Any pointers ?

Reply 1

This is a common issue with custom properties in SharePoint webpart.

Just try call the method that modifies your custom property in the PreRender event.

For more check these links:

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/6445d939-05da-4ce9-a2cf-3e9fe28b98ee

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/5b85a5dc-37aa-49d7-a741-d40c7bd2bd0c




BR, PM

Reply 2

Hi

 

Thanks for you guidance,

I had to use a property from custom tool part to a script in the usercontrol( inside our web part).

calling my RegisterStartUpScript inside OnPreRender in user control solved my problem.

 

Thanks

Reply 3

Awesome news!!




BR, PM

 

No comments:

Post a Comment