Closed GoogleCodeExporter closed 9 years ago
Hi,
Thanks, for this but are you using the latest version of plugin that is placed
on the site. 1.3 is just last version package with offline examples. There is
similar functionality on this page
http://jquery-datatables-editable.googlecode.com/svn/trunk/inline-edit-parameter
s.html that uses the latest version of plugin 2.0.7.
Could you let me know is this same as the functionality you have implemented?
Thanks,
Jovan
Original comment by joc...@gmail.com
on 9 Feb 2012 at 9:47
Original comment by joc...@gmail.com
on 9 Feb 2012 at 10:19
Hello, I've been trying to implement this passing of the parameters but while
using oDeleteParameters. The paramaters are posting fine. But I'm not sure how
to grab the row 'id' of the selected row. Please help.
Original comment by simon...@gmail.com
on 17 Feb 2012 at 1:02
I don't understand this. Row id is automatically sent to delete page see
http://jquery-datatables-editable.googlecode.com/svn/trunk/delete-record.html .
Where you want to grab it?
Jovan
Original comment by joc...@gmail.com
on 17 Feb 2012 at 8:12
Hi Jovan,
I need to get the rowId within oUpdateParameters. After getting the rowId, I need to get the value of one more td for that particular row.
for example : if user is editing the <td>second</td> then I need to get the
value of
<td>first</td> as well and send it to the server.
<tr id="8">
<td>first</td>
<td>second</td>
</tr>
Thanks,
Raj
Original comment by v.rajku...@gmail.com
on 22 Feb 2012 at 9:45
You can in fnOnEditing take this input, find TR parent that surrounds it, find
first TD in that TR, and put that value in some local variable.
Then you can in oUpdateParameters define additional parameter that is function
that read local variable and add it to the input set parameters. I would look
like:
var currentKey = '';
$('#example').dataTable().makeEditable({
fnOnEditing: function(input)
{ currentKey = input.parents("tr").children("td:first").text();
return true;
},
oUpdateParameters: {
key: function(){ return currentKey; }
}
});
I have created example in
http://jquery-datatables-editable.googlecode.com/svn/trunk/issue91.html. Ignore
the error message and see parameters that are sent to server-side in Ajax call.
You will see that parameter parameter key is always first cell of the row.
Jovan
Note I think that this issue can be closed. I will add this example on wiki if
you confirm that this is what you need.
Original comment by joc...@gmail.com
on 24 Feb 2012 at 4:37
Thank you very much Jovan. This solves my issue now. Appreciate your quick
response.
Raj
Original comment by v.rajku...@gmail.com
on 24 Feb 2012 at 5:16
I have added this example in the how to wiki page
http://code.google.com/p/jquery-datatables-editable/wiki/HowTo
Original comment by joc...@gmail.com
on 24 Feb 2012 at 8:57
Hi Jovan,
The fix is working for all the columns except the first one (which is the key). For example if I edit rendering engine column in the example you have provided the key is going in as empty. All other columns send the key correctly.
I should have tested thoroughly.
Thanks,
Raj
Original comment by v.rajku...@gmail.com
on 27 Feb 2012 at 5:07
I should add more information on why the above is needed.
I want to validate the duplicate entry of the primary key. If the key exists in
the table already, we have to disallow users entering that information again.
May be there is another way to do this.
Thanks
Raj
Original comment by v.rajku...@gmail.com
on 27 Feb 2012 at 5:10
Original issue reported on code.google.com by
ezio.bo...@gmail.com
on 30 Nov 2011 at 5:40