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

[Solved] how to update the edit pop windows

3 Answers 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ori
Top achievements
Rank 1
ori asked on 06 Jan 2012, 10:21 PM
Hi to all,

i am using the mvc grid and when i click on edit i get a pop up page.
i would like to update this pop up page.

the grid shows all the fields in the object, i would like to select which fields to update and update the text in the page.

Can some one advice me how to do it?

Thank you

Ori

3 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 09 Jan 2012, 11:14 AM
Hello Ori,


To create a custom popup editing window for the Grid, you need to add an Editor Template with the same name as your model under the Shared/EditorTemplates folder. For sample project take a look at this Code Library article


Kind regards,
Petur Subev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
ori
Top achievements
Rank 1
answered on 10 Jan 2012, 10:35 AM
Hi Petur,

it works great, Thank you.

1.
If i would like to attache custom view to specific view, can we tell the grid which user control to use under an action(create,edit) ?

example: Create new will have different text then the update view.

2. how can i show the calendar on datetime fields in the custom control ?

3. I am working on validation, in case of invalid data i would like to go back to the grid in edit mode, and let the user see the validation message. how can i do that ?

 
Thank you

Ori
0
Petur Subev
Telerik team
answered on 12 Jan 2012, 10:14 AM
Hello Ori,

  1. Basically the editor used for insert and edit operations is the same. If you want you can create a custom editor popup using the approach with template column which opens a window to display a custom edit view. Check the attached file for implementation.
  2. If you included the editor templates (which are added automatically when using the wizard to create new MVC project using the Telerik extensions) under the Shared/EditorTemplates folder when using a HTML helper to create editor fields (i.e. @Html.EditorFor(model => model.Date) ) the DateTimePicker should be used when rendering the View.
  3. To enable validation when using forms loaded via Ajax please take a look at this Code Library article.

All the best,
Petur Subev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Grid
Asked by
ori
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
ori
Top achievements
Rank 1
Share this question
or