editing form for individual cell
editing form for individual cell
Hi Allan,
I am trying to make an attendance sheet and make entry through a form appearing on clicking each cell matches the employee and the date.
db tables i m using is an attendance entry( where date and other leave details are entered )
using the dom table (not ajax ) i made the table appearing and marked present or absent on it.
[code]Employee Apr1 Apr2 Apr3 etc [/code]
Now I have to update the entry against each date for each employee using modal form. I could not edit whole row as it is not different fields but different records of same db table.
Can you please guide me for a solution. or is it almost impossible by data table editor?
thanking you
Vinod
I am trying to make an attendance sheet and make entry through a form appearing on clicking each cell matches the employee and the date.
db tables i m using is an attendance entry( where date and other leave details are entered )
using the dom table (not ajax ) i made the table appearing and marked present or absent on it.
[code]Employee Apr1 Apr2 Apr3 etc [/code]
Now I have to update the entry against each date for each employee using modal form. I could not edit whole row as it is not different fields but different records of same db table.
Can you please guide me for a solution. or is it almost impossible by data table editor?
thanking you
Vinod
This discussion has been closed.
Replies
Allan
So I initialized the editor for date of absence of the employee.
But...Normally we used to get the row id to edit a record containing the entire row
[code]
// Edit record
$('#example').on('click', 'a.editor_edit', function (e) {
e.preventDefault();
editor.edit(
$(this).parents('tr')[0],
'Edit record',
{ "label": "Update", "fn": function () { editor.submit() } }
);
} );
[/code]
1) How to pass the row column value, as in my case( values are employee number and date) so as to edit the data base row contains that employee number -date pair
2) is there any tutorial on set method to set the values of the fields based on the values we get from Ajax.
Regards
Vinod