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

EditFormSettings EditFormType="Template" with inner user control whose components are all null

1 Answer 392 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Iago
Top achievements
Rank 1
Iago asked on 16 Oct 2017, 09:02 AM

Hello,
I am using a RadGrid with EditFormSettings EditFormType="Template". 
I would like to add inside the <FormTemplate> a user control that resides in another library that I had created as an embedded resource library as described here: https://www.codeproject.com/kb/user-controls/embeddedusercontrol.aspx.
The problem I'm facing is that  when trying to display the edit form, in  Page_Load event inside my user control,  all inner components (textboxes, radwindows, etc.) are null. 
What am I doing wrong? 

Another alternative I had thought about would be to wrap my formtemplate in a usercontrol that I would like to store in my controls library. In this case, 
what would be the UserControlPath? I have found an example with applications root reference (UserControlPath="~/WebUserControl.ascx"), but I was not able to point it to a different assembly.
Is there any way of creating the user control in code behind and set it to the grid edit form?

Any help would be appreciated. Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 19 Oct 2017, 03:38 PM
Hello Iago,

There is a nice example which shows how to load a user control in an edit template: http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/edit-form-types/defaultcs.aspx.

You can examine its code and try to load the user control in a similar way.

Best regards,
Rumen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Iago
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or