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

custom edit form

3 Answers 114 Views
Grid
This is a migrated thread and some comments may be shown as answers.
André
Top achievements
Rank 1
André asked on 10 Mar 2015, 06:01 PM

hello,

i'm currently doing some experiments with the radgrid control and edit capabilities/options it offers, this is my current situation:

 - there's about 30 radgrids on my test page, each one is dynamically and programmatically created, and each one will be editable
 - each grid needs to have it's own custom edit form generated from the columns present on the respective radgrid
 - the previous version of the website uses standard gridviews and already has all the code behind that creates table rows, columns and controls in a separate "Details" page
 - the edit forms need to have combos/dropdowns, datetimepickers, textboxes and so on
 - my plan is to use the code behind to programmatically create all the edit forms

now as far as i know my current options are:
 - programmatically create a template on the EditCommand event and then "binding" it to the grid
 - create a new webusercontrol on the EditCommand event and then add all the controls i want to

are there any other options?
is any of the options i listed possible?

i would appreciate some help on this

 

 

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 13 Mar 2015, 09:56 AM
Hi André,

You can create and assign the edit form template at runtime in the code-behind. To do this, you must design a class that implements the IBindableTemplate interface and assign an instance of that class to the EditFormSettings.FormTemplate property of the table view. As an added touch, you can add an ExtractValues method to facilitate extracting values from the edit form.

See the last paragraph of the help topic below that demonstrates this option:
http://www.telerik.com/help/aspnet-ajax/grid-custom-edit-forms.html

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
André
Top achievements
Rank 1
answered on 13 Mar 2015, 12:50 PM
well i have tried that but got the following errors
- "Class 'MyEditFormTemplate' must implement 'Function ExtractValues(container As control) As Collections.Specialized.IOrderedDictionary' for interface 'System.Web.UI.IbindableTemplate'."
- "Class 'MyEditFormTemplate' must implement 'Sub InstantiateIn(container As Control)' for interface 'System.Web.UI.ITemplate'."






0
Maria Ilieva
Telerik team
answered on 18 Mar 2015, 09:43 AM
Hi André,

Find attached a sample runnable application that works properly on my end. Test it locally and verify what the difference in your case is.

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
André
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
André
Top achievements
Rank 1
Share this question
or