locked
Add Edit/Delete Images RRS feed

  • Question

  • User-1499457942 posted

    Hi

      I have the below code . After trname i want to add Edit & Delete Image also.

    $.each(customers, function () {
                        var customer = $(this);
                        rows.push("<tr>");
                        rows.push("<td>" + $(this).find("trcode").text() + "</td>");
                        rows.push("<td>" + $(this).find("trname").text() + "</td>");
                        rows.push("</tr>");
                    });

    Thanks

    Thursday, December 24, 2015 6:57 AM

Answers

  • User61956409 posted

    Hi JagjitSingh,

    After trname i want to add Edit & Delete Image

    According to your code, it seems that your jQuery code could dynamically add rows to table. If you’d like to add edit/delete images, you could add an additional column.

    $.each(customers, function () {
        var customer = $(this);
        rows.push("<tr>");
        rows.push("<td>" + $(this).find("trcode").text() + "</td>");
        rows.push("<td>" + $(this).find("trname").text() + "</td>");
    
        //add an additional column for edit and delete images
        rows.push("<td><img class='btnedit' src='Images/edit.png' /><img class='btndel' src='Images/delete.png' /></td>");
        rows.push("</tr>");
    });
    

    Best Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, December 25, 2015 3:22 AM