Ignacio Calvo
Ignacio Calvo

Reputation: 834

Focus edit-form popup for Telerik MVC Grid

How can you focus the edit-form Popup for Telerik MVC grid? Solutions that not hack Telerik code are preferred.

Upvotes: 0

Views: 985

Answers (1)

Atanas Korchev
Atanas Korchev

Reputation: 30671

You can use the OnEdit event of the grid, find some input element from the form and focus it. Here is some sample code:

<script type="text/javascript">
function Grid_onEdit(e) {
    var form = e.form;
    $(form).find("input:first").focus();
}
</script>

Upvotes: 3

Related Questions