8 Answers, 1 is accepted
The edit event is fired when user edits or creates a data item. The property e.container holds the popup window and its possible to modify it.
The following dojo sample illustrates how to modify the popup window when user edits a data item:
Regards,
Georgi
Progress Telerik
Could you please provide us more detailed information of the scenario and what you are trying to achieve? So I can provide a solution for the exact case.
The popup can be customized, please refer to the following project which illustrates how to customize the popup edit window:
The only event that allows you to intercept the popup instantiation is edit.
Regards,
Georgi
Progress Telerik
A possible solution is to request the fees history from the server using jQuery AJAX when the edit event is fired. This way the ancillary data will by accessible within the popup window.
In case the additional data is requested with the current page, another solution is to store the data inside a hidden input and retrieve it when edit event is fired using jQuery.
Since there is no built in functionality for passing additional data to the edit popup window, please give a try to the aforementioned approaches and let me know if they work for you.
Regards,
Georgi
Progress Telerik
Hi Georgi,
Can we use the grid edit event fire a Ajax call to get more data from database, store in the model and render in the popup editor for user updating?
Regards,
On
>> A possible solution is to request the fees history from the server using jQuery AJAX when the edit event is fired. This way the ancillary data will by accessible within the popup window.
I'm curious about this... I can pull the data (it's actually already available in the javascript), but the edit window is bound to the model of the grid. How do I make this ancillary data available? How would I actually use it in the popup edit form? For the record, I do have my own popup edit form I put together for this,it uses the model that is bound to the grid, there's no place to put ancillary data. So how do I make use of it in the popup?
Chung, yes it is possible to request more data when edit event is fired and use it in the popup editor. I have assembled small sample which requests data when the edit event is fired and uses the result as dataSource for drop down editor:
Joe, since the data is already available in the javascript I suggest you to use validation. In other words add a validation rule that checks whether the new value is already contained in the ancillary data:
You can find more information about validation in the following demo:
Regards,
Georgi
Progress Telerik