Click here to Skip to main content
16,016,678 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
My code is.

script type="text/javascript">
$(document).ready(function () {
var t = $('#sample_editable_1x').DataTable();
var counter = 1;

$('#sample_editable_1_new').on('click', function () {
t.row.add().draw();
Posted
Updated 2-Oct-16 20:20pm

1 solution

This kind of error generally appears for either of the 2 reasons-
1. You have used two ids i.e, sample_editable_1x and sample_editable_1_new. Make sure that there is no speling mistake and they really exist.
2. Make sure that these ids are unique in the form and no other element has such ids.

Please let me know, if it doesn't help :)
 
Share this answer
 
Comments
T_Sub 3-Oct-16 3:53am    
solved it there is a miss match in jquery raws and table raws (count) thank you very much for your advises.
Suvendu Shekhar Giri 3-Oct-16 4:41am    
Glad to know that your issue is resolved now.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900