easyui datagrid set focus when adding row

onBeginEdit:function(index ,data){  
                var ed = $(this).datagrid('getEditor', { index: index, field: 'Number' });  
                $(ed.target).next().children().focus(); //The api is directly ed.target, it is found that it is not reflected, you need to set the first child element of the next element of ed.target to focus just do  
                //$($(ed.target).next().children()[0]).focus(); //If the above doesn't work, use this  
            }  

  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324771844&siteId=291194637
Recommended