このようなもの: ?(手書き - 未テスト)
モデル:
public class MyModel
{
[UIHint("MyCustomEditorTemplateType")]
public int MyField { get; set; }
}
意見:
@model MyModel
@Html.EditorFor(m => m.MyField)
エディタ テンプレート:
@model string
@Html.TextBoxFor(m => m, new { @class = "forpopupcontrol" })
<div id="@(string.Format("{0}_container", Html.IdFor(m => m)))" style="display:none">
@* code build table here *@
</div>
JS:
<script>
$(function()
{
$('.forpopupcontrol').focus(function()
{
$('#' + $(this).attr('id') + '_Container').show();
}).blur(function()
{
$('#' + $(this).attr('id') + '_Container').hide();
});
}
</script>