Using master page with formAddNewRow for Jquery DataTable Editable

Using master page with formAddNewRow for Jquery DataTable Editable

dvnandoverdvnandover Posts: 42Questions: 0Answers: 0
edited November 2011 in General
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?

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    You can specify the id of the form with "sAddNewRowFormId"

    [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
  • dvnandoverdvnandover Posts: 42Questions: 0Answers: 0
    edited November 2011
    The form on the bottom always showed and the popup only show an empty box with cancel and ok button.

    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
  • dvnandoverdvnandover Posts: 42Questions: 0Answers: 0
    By the way are there seperate forums for jeditable and datatables.editable?
  • gmusumecigmusumeci Posts: 1Questions: 0Answers: 0
    Anyone fixed this issue? I have some problem. Thanks
This discussion has been closed.