Using master page with formAddNewRow for Jquery DataTable Editable
Using master page with formAddNewRow for Jquery DataTable Editable
dvnandover
Posts: 42Questions: 0Answers: 0
Adding a new record using jquery DataTable editable plugin require the use of a form with id of formAddNewRow but my page implemented a master page which already have a form defined. How id i get around the issue?
This discussion has been closed.
Replies
[code]$('#myDataTable').dataTable().makeEditable({
sAddNewRowFormId: "formAddNewCompany"
}); [/code]
http://code.google.com/p/jquery-datatables-editable/wiki/AddingNewRecords#Specifying_id_of_the_add_new_record_form
Here is my master page:
Here is my test page that i am using datatables and other plugins:
<%@ Page Title="" Language="C#" MasterPageFile="~/MyMasterPage.master" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %>
$(function() {
debugger;
var dataTableOjb = null;
LoadRegisteredRoeUsersTable();
dataTableOjb = $("#allusertbl").dataTable({
"sDom": 'rt',
"bJQueryUI": true,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "UpdateDataBaseTable.ashx?table=userregistrationinfo&action=select",
"sPaginationType": "two_button",
"iDisplayLength": 100,
"aLengthMenu": [[100, 200, 500, -1], [100, 200, 500, "All"]],
"aoColumns": [
{ "mDataProp": "UserName" },
{ "mDataProp": "Email" }
]
}).makeEditable({
sUpdateURL: "UpdateDataBaseTable.ashx?table=userregistrationinfo&action=update",
sUpdateHttpMethod: "POST",
sAddURL: "UpdateDataBaseTable.ashx?table=userregistrationinfo&action=new",
sAddHttpMethod: "POST",
sDeleteURL: "UpdateDataBaseTable.ashx?table=userregistrationinfo&action=delete",
sDeleteHttpMethod: "POST",
"aaSorting": [[1, "asc"]],
sAddNewRowFormId: "formAddNewUser",
oAddNewRowButtonOptions: { label: "Add...",
icons: { primary: 'ui-icon-plus' }
},
oDeleteRowButtonOptions: { label: "Remove",
icons: { primary: 'ui-icon-trash' }
},
oAddNewRowFormOptions: {
title: 'Add ROE User',
show: "blind",
hide: "explode",
modal: true
},
sAddDeleteToolbarSelector: ".dataTables_length"
});
UserName
Email
No maching records found
UserName
Email