I have a grid (employees grid) that will say 1000-2000 lines. I display the employee name and department in the grid. When I get data for the grid, I get other details for the employee (Date of birth, location, role, etc.), Thus, the user has the ability to edit the employee data. when he clicks on the edit, I need to display other employee data in a popup window. since I saved all the data in JavaScript, I am looking for a specific identifier and display all the details. so the code will look like
function getUserDetails(employeeId){
for(var i=0;i<employeeInformation.length;i++){
if(employeeInformation[i].employeeID==employeeId){
}
}
}
the second solution would be like passing employeeid to the database and getting all the information for the employee. The code will be like
function getUserDetails(employeeId){
}
, , , , 1000-2000 .
, JavaScript , .
:
.
4 500 ( ). , - .
, , data-rowId , .
, , employeeInfo.
- .. $(this).attr('data-rowId') rowId employeeInfo [$ (this).attr('data-rowId')] ,
, employeeid employee, employeeid, rowid . . .