Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to create a filter dynamically through code, and for that I need to set the property UseDefaultConfiguration to false.

However, just this simple thing below causes the webpart to "hang" on the page, with the message "Refresh the page to see the latest changes."

protected override void CreateChildControls()
{
    UseDefaultConfiguration = false;
    base.CreateChildControls();
}

I can refresh as long as I want, but nothing happens. Did I put this first line in a wrong place or something? How can I solve this?

Thanks in advance, Igor

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

You always seem to get this message while the page is in edit mode, even after refreshing as it suggests. Have you tried stopping editing and going back to the display mode for the page?

share|improve this answer
    
Of course! Saving, refreshing, restarting browser, viewing in different browser, restarting machine, everything.. It's only the webpart that seems to stay stuck in the edit mode. –  user2792 Apr 1 '11 at 12:06
    
It was just a thought. Have you tried setting the property earlier in the page lifecycle? E.g. override OnInit(xxx) ? –  SPDoctor Apr 1 '11 at 12:17
    
This seems to work! Thank you very much :) –  user2792 Apr 1 '11 at 13:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.