Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > StopProcessing functionality for "User Control" webpart View modes: 
User avatar
Certified Developer v6
Certified Developer v6
Dave - 8/1/2013 3:01:57 PM
   
StopProcessing functionality for "User Control" webpart
Hi

The "User Control" web part allows you to use a standard ASCX UserControl that may require particular lifecycle events to be properly executed (as opposed to a regular CMSAbstractWebPart control which may not load with the normal control lifecycle).

Is there a way to expose the CMSAbstractWebPart's StopProcessing property/functionality to a UserControl loaded in the "User Control" web part?

Thanks!

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 8/2/2013 12:38:19 PM
   
RE:StopProcessing functionality for "User Control" webpart
I don't believe you can access that from within your custom control.

What you could do is create a simple webpart and dynamically load your custom control in code behind (pretty much copy and paste code for the user control webpart) and get at the StopProcessing property there.

Have you looked into just converting it to a webpart?

User avatar
Certified Developer v6
Certified Developer v6
Dave - 8/2/2013 12:41:31 PM
   
RE:StopProcessing functionality for "User Control" webpart
This is actually an issue we previously found specifically with Telerik's RadGrid and sorting - if it's implemented as a WebPart, it does not sort properly. We believe this is because the control's lifecycle isn't happening the same way a normal control would. I haven't tried finding a workaround since discovering the User Control webpart worked.

I'll give your suggestion a try though, thanks!

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/4/2013 1:43:31 AM
   
RE:StopProcessing functionality for "User Control" webpart
Hi,

The previous suggestion is also a way how to do it. Or, you can try using the ControlsHelper class and use the get parent control method and use the stop processing method from it.

Best regards,
Juraj Ondrus