Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Consumer Web Part with User Control

  Asked By: Connor    Date: Sep 29    Category: Sharepoint    Views: 1477

I have a question regarding what is possible to accomplish with a User Control and a Consumer Web Part. In short I am trying to build master/detail functionality where the master information is in custom list and the detail information is a user control in a consumer web part.

What Works – I built a consumer web part in which I am able to connect it to another web part (in my case a custom list), and prove that it is ‘hooked’ up by displaying the consumed value via the html writer in RenderWebParts.

What I Am Trying to Make Work – I would like to have the connected value consumed by a user control we have built, and have it process that value appropriately. I have overridden CreateChildControls to add the control to the control collection in my consumer web part. My user control depends on a property being set to display the correct information. How/Where do I set this property? I am noticing that CreateChildControls fires when the web part is loading – but that seems to be after the CellReady event fires which captures the data that I need for my user control. Does anyone have any suggestions as to how I might have the user control in my consumer web part data bind properly to the consumed data?



1 Answer Found

Answer #1    Answered By: Alphonso Mckay     Answered On: Sep 29

I should add  that the user  control I am building is a dundas chart control. I have successfully built web  parts with this dundas chart already, ones that will take inputs from web part  properties and work  with these inputs as expected. It seems that the control  needs to know all its inputs at the time the control is added (in CreateChildControlsThis does not appear possible in a connected  web part model. Any suggestions?

Didn't find what you were looking for? Find more on Consumer Web Part with User Control Or get search suggestion and latest updates.