Technical support This forum is closed.
Version 1.x > Technical support > Find Control View modes: 
User avatar
Member
Member
kamran - 8/29/2006 5:01:45 AM
   
Find Control
How can one find a control in the CMSEditableregion.

if (oCt is Kentico.CMS.CMSControls.CMSEditableRegion)
{

foreach (Kentico.CMS.CMSControls oC in oCt.Controls) //this gives an error
{
do something
}
}

For example i have inserted a control into it and at rumtime i want to know if it exists or not. If it does then i want to attach an event with it.


User avatar
Member
Member
kamran - 8/29/2006 5:30:46 AM
   
Re: Find Control
Basically i am looking for the inlineusercontrol that was dragged onto the editable region.

User avatar
Guest
admin - 8/29/2006 10:49:49 PM
   
Re: Find Control
Hello,

Thank you for your message. Unfortunately, it's not possible search for inline control as it's inserted dynamically, after your code is run. If you need to modify it somehow, you should place the code inside the inline user control.

Best Regards,

User avatar
Member
Member
kamran - 8/30/2006 1:19:52 AM
   
Re: Find Control
hmm..ok..how about the view state..for example if insert an inlineusercontrol in the cmseditableregion...which is just a button..on postback it gives a failed to load view state error..I understand that the control is added dynamically but i need to have the viewstate enabled for that control..any thoughts on this.

User avatar
Guest
admin - 8/31/2006 7:00:22 PM
   
Re: Find Control
Hello,

Thank you for your message. Unfortunately, there are issues with postbacks in inline controls in the current version that are caused by the control lifecycle. Since they require complex changes, they will be solved in version 2.0.

I'm sorry for this inconvenience.

Best Regards,

User avatar
Member
Member
kamran - 9/1/2006 2:15:36 AM
   
Re: Find Control
When do we expect version 2 to be released, as i am evaluating the product for purchase. Also that means that viewstate would not function properly on postback. The viewstate is initialized properly on first time when the page loads but gives failed to load view state when it is post back.

User avatar
Guest
admin - 9/1/2006 5:06:54 PM
   
Re: Find Control
2.0 is now scheduled for end of September 2006.

Regards,