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
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
/Victor
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.
Pesho
the Telerik team
thanks
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