This topic contains 3 replies, has 2 voices, and was last updated by Sean Sean 3 years ago.

Editable table


  • priyak
    Participant

    Posts: 9
    Member Reply #1172

    hi

    In following table I want to edit only one field of table not entire row.

    http://www.keenthemes.com/preview/metronic/theme/templates/admin/table_editable.html

    Sean
    Sean
    Keymaster

    Posts: 4451
    Support Staff Reply #1199

    Hi :),

    In your case you will just need to modify it here:

    theme/assets/admin/pages/scripts/table-editable.js

    Thanks.


    priyak
    Participant

    Posts: 9
    Member Reply #1213

    hi

    I tried but when i Modify it content from input after saving goes to first column. Can you guide how to modify below.

    var TableEditable = function () {

     

    var handleTable = function () {

     

    function restoreRow(oTable, nRow) {

    var aData = oTable.fnGetData(nRow);

    var jqTds = $(‘>td’, nRow);

     

    for (var i = 0, iLen = jqTds.length; i < iLen; i++) {

    oTable.fnUpdate(aData[i], nRow, i, false);

    }

     

    oTable.fnDraw();

    }

     

    function editRow(oTable, nRow) {

    var aData = oTable.fnGetData(nRow);

    var jqTds = $(‘>td’, nRow);

    jqTds[0].innerHTML = ‘<input type=”text” class=”form-control input-small” value=”‘ + aData[0] + ‘”>’;

    jqTds[1].innerHTML = ‘<input type=”text” class=”form-control input-small” value=”‘ + aData[1] + ‘”>’;

    jqTds[2].innerHTML = ‘<input type=”text” class=”form-control input-small” value=”‘ + aData[2] + ‘”>’;

    jqTds[3].innerHTML = ‘<input type=”text” class=”form-control input-small” value=”‘ + aData[3] + ‘”>’;

    jqTds[4].innerHTML = ‘Save‘;

    jqTds[5].innerHTML = ‘Cancel‘;

    }

     

    function saveRow(oTable, nRow) {

    var jqInputs = $(‘input’, nRow);

    oTable.fnUpdate(jqInputs[0].value, nRow, 0, false);

    oTable.fnUpdate(jqInputs[1].value, nRow, 1, false);

    oTable.fnUpdate(jqInputs[2].value, nRow, 2, false);

    oTable.fnUpdate(jqInputs[3].value, nRow, 3, false);

    oTable.fnUpdate(‘Edit‘, nRow, 4, false);

    oTable.fnUpdate(‘Delete‘, nRow, 5, false);

    oTable.fnDraw();

    }

     

    function cancelEditRow(oTable, nRow) {

    var jqInputs = $(‘input’, nRow);

    oTable.fnUpdate(jqInputs[0].value, nRow, 0, false);

    oTable.fnUpdate(jqInputs[1].value, nRow, 1, false);

    oTable.fnUpdate(jqInputs[2].value, nRow, 2, false);

    oTable.fnUpdate(jqInputs[3].value, nRow, 3, false);

    oTable.fnUpdate(‘Edit‘, nRow, 4, false);

    oTable.fnDraw();

    }

    Sean
    Sean
    Keymaster

    Posts: 4451
    Support Staff Reply #1233

    Hi :),

    Sorry, our support does not cover the theme modifications and integration.

    Basically to utilize the metronic in your custom system you will need some experience in end to end web development since this theme is not for non-developer users. Metronic is basically an HTML theme(built with HTML, javascript and css) without actual functionality(the database integration and application business model). The actual implementation is responsibility of buyer.  Basically any web applications/systems contain of 2 layers:

    1) Design and Frontend UI(html, css, javascript)

    2) Actual system implementation using a server side language such as PHP or Java, and database engine such as MySQL or Oracle.

    So our Metronic theme, as an HTML theme helps you on the step #1. The step #2 will be responsibility of the buyers as every buyer has own requirements and system specification.

    If you need any further clarifications please let us know. For more info you can check our FAQ here:

    http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469/support

    Thanks.

You must be logged in to reply to this topic.