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

[Solved] Load popup editor content with ajax?

8 Answers 194 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.
Victor
Top achievements
Rank 1
Victor asked on 16 Aug 2011, 09:07 AM
Hi!

I have encountered this "issue" so many time now, but found decent workarounds, but I thought I as well might ask this time:

Is it possible to load the content of the grid popup editor with ajax?

What I mean is that I have a complex editor template for the popup that "requires" server interaction (or rather contains a lot of custom code and javascript components). Since the popup editor is pre-created with an empty model these scenarios become very difficult. Up until now we have solved the problems by redirecting to a separate page for adding/editing, but a smoother solution would really be nice.

We realize that it is possible to use server editing to get the desired behaviour, but since the grid is nested inside tabs that gets really cumbersome as well (apart from that the "feel" gets a lot worse since the entire page has to reload).


Is this possible in any way / are there any nice workarounds?

Thanks
/Victor

8 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 16 Aug 2011, 11:18 AM
Hi Victor,

 The short answer is no. You cannot currently load the editor form using the built-in popup editing mode. A possible solution is to use the OnEdit event and initialize the form when the user edits a record. Another way to deal with this is to implement custom popup editing by adding a button to a template command. Then you can open a window which will load a partial view from ajax. 

I hope this helps.,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

0
Victor
Top achievements
Rank 1
answered on 16 Aug 2011, 11:59 AM
Thanks for the reply, as we suspected then. We will probably implement something using the OnEdit event.

/Victor
0
Roel
Top achievements
Rank 1
answered on 16 Nov 2011, 09:22 PM
sample please. thanks

Roel
0
Petur Subev
Telerik team
answered on 18 Nov 2011, 03:45 PM
Hello Roel,

I attached a sample project implementing how to create a custom edit popup window which loads its data with Ajax. You can use it as a base and extend it further to fit your scenario.

Greetings,
Pesho
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
Roel
Top achievements
Rank 1
answered on 01 Dec 2011, 06:22 PM
can you do the same with custom commands? sample?

thanks
0
Jared
Top achievements
Rank 1
answered on 02 Dec 2011, 09:14 PM
Very interested as well
0
Petur Subev
Telerik team
answered on 05 Dec 2011, 02:33 PM
Hello everyone,

Since the action method requested by the custom Ajax command must be a JSON result, you are not able get a HTML as a result and bind it to a window on the client side.
I attached a project which implements the same behavior as the custom edit demo from my previous post, but now using a custom Ajax command. I strongly recommend however, to use the template column approach - the command functionality is not intended to be used in such way.


Greetings,
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
Bill
Top achievements
Rank 1
answered on 06 Dec 2011, 05:03 PM
please ignore
Tags
Grid
Asked by
Victor
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Victor
Top achievements
Rank 1
Roel
Top achievements
Rank 1
Petur Subev
Telerik team
Jared
Top achievements
Rank 1
Bill
Top achievements
Rank 1
Share this question
or