Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Web Part Code Suggestions

  Asked By: Sydney    Date: Dec 04    Category: Sharepoint    Views: 1678

I've run into this issue or similar ones in the past and I've never really
managed to create a viable solution to it. I was wondering if there were any
good suggestions for how to get around this.

For my specific example I'm currently working on, I have a tree view control
(www.funkelab.com/website.aspx?displayid=1216) embedded in a Web Part.
The tree view requires that the individual nodes be added in the
CreateChildControls method in order for any events to fire (onclick postbacks
etc.) The data used for the individual nodes are read from a database and the
connection information for that database is manipulated through the tool part by
a Site Administrator (the tool part will only show for Site Admins). If the
admin changes the connection information, obviously the CreateChildControls
method has to be recalled in order for the new nodes to be populated from the
new data source. This is the problem - CreateChildControls is not called during
the ApplyChanges from the tool part - only the RenderWebPart method is. The
properties change on the Web Part correctly but I still get the old tree view
until I close the browser down and go back in (and the CreateChildControls
method gets called).



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Web Part Code Suggestions Or get search suggestion and latest updates.