Some need to do some modification functions, so how to get the data of the selected row and assign the data to the new edit box? The API also provides us with a property getSelected. The specific usage is as follows:
//Modify data
function doEdit() {
$('#w').window('open');//Open a new edit box
var row = $('#dg').datagrid('getSelected');/ /Get the data of the selected row
if (row) {
//Assign the data in the selected row of the table to the new modification box
//textbox represents the cell in which row of data you selected uses easyui-textbox of easyUI;
$('#InfoUser').textbox('setValue', row["LoginName"]);
$('#UserInfoName').textbox('setValue', row["UserName"]);
//combobox represents the cell in which row of data you selected uses easyui-combobox of easyUI; that is, the drop-down box
$('#UserInfoPosition').combobox('setValue', row["StationName"]);
$('#UserInfoAuthority').combobox('setValue', row["RoleName"]);
}
}