Based on the provided information, I suspect that the utilized edit mode is PopUp, is that correct? And you would like to render a custom template whenever the grid enters edit mode?
If so, what I can recommend is that you create a custom view and reference it via the options of the grid:
.Editable(ed => ed.Mode(GridEditMode.PopUp).TemplateName("CustomTemplateName"))
Within the "CustomTemplateName", you could set any content of your choice. A complete example for the certain functionality could be found in the following repository on GitHub:
Let me know in case additional assistance is required.