This is a migrated thread and some comments may be shown as answers.

RadpopupEditor associated control

5 Answers 121 Views
PopupEditor
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 30 Nov 2015, 09:01 PM
Can the associated control be set at runtime?

5 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 01 Dec 2015, 01:46 PM
Hi Jessica,

Thank you for writing.

The AssociatedControl property can be set only at design time. For now you can set the associated control with the following code:
private void radButton1_Click(object sender, EventArgs e)
{
    this.radPopupEditor1.PopupEditorElement.PopupForm.Controls.Add(this.radPopupContainer1);
    var field = typeof(RadPopupContainerForm).GetField("panel", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
    field.SetValue(this.radPopupEditor1.PopupEditorElement.PopupContainerForm, this.radPopupContainer1.PanelContainer);
 
    this.radPopupEditor1.PopupEditorElement.ShowPopup();
}

When the next official version is released you will be able to add the control with the following code:
this.radPopupEditor1.SetAssociatedControlRuntime(editorContainer);

Please let me know if there is something else I can help you with. 
 
Regards,
Dimitar
Telerik

0
Daniel
Top achievements
Rank 1
answered on 24 Apr 2016, 11:31 PM

Hello, it would be possible to translate me this line code to vb please would appreciate is the only thing I'm missing

 

var field = typeof(RadPopupContainerForm).GetField("panel", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)
0
Dimitar
Telerik team
answered on 25 Apr 2016, 09:20 AM
Hi Daniel,

Here is the line:
Dim field = GetType(RadPopupContainerForm).GetField("panel", System.Reflection.BindingFlags.NonPublic Or System.Reflection.BindingFlags.Instance)

You can use our free online converter for this: VB Converter.

I hope this helps.

Regards,
Dimitar
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Daniel
Top achievements
Rank 1
answered on 25 Apr 2016, 12:50 PM
Many thanks
0
Daniel
Top achievements
Rank 1
answered on 25 Apr 2016, 12:51 PM
Many thanks
Tags
PopupEditor
Asked by
Stephen
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or