Title: Inrow delete button Post by: kavvson on August 01, 2014, 03:06:12 AM I figured out for a link but how to manage it for a delete option
Code: <th field ="detail" width = "120" formatter="formatDetail">Actions</th> Code: function formatDetail(value,row){ using this Code: function destroyUser(row){ I tried to add onclick destroy(row.id) but seems not working somehow. 20 message boxes appears on load. Title: Re: Inrow delete button Post by: stworthy on August 01, 2014, 04:00:41 AM Please try the code below:
Code: function formatDetail(value,row){ Title: Re: Inrow delete button Post by: thecyberzone on November 06, 2016, 08:04:51 AM This code works fine, but if I want to insert 2 nos of button say, one for Delete and another for Save how will I reference them individually for onClick method? Because code for inRow Delete button and Save button will be different.
Title: Re: Inrow delete button Post by: stworthy on November 07, 2016, 05:24:19 AM You can attach a 'act' attribute to indicate which button is clicked.
Code: function formatDetail(value,row){ Title: Re: Inrow delete button Post by: daniel_john on November 08, 2016, 06:52:56 AM This is what I am using for inline "CRUD":
{ field: 'action', title: 'Action', width: 100, align: 'center', formatter: function (value, row, index) { if (row.editing) { var s = '<a href="javascript:void(0)" onclick="saverow(this)">Save</a> '; var c = '<a href="javascript:void(0)" onclick="cancelrow(this)">Cancel</a>'; return s + c; } else { var e = '<a href="javascript:void(0)" onclick="editrow(this)">Edit</a> '; var d = '<a href="javascript:void(0)" onclick="deleterow(this)">Delete</a>'; return e + d; } } }, Title: Re: Inrow delete button Post by: thecyberzone on November 10, 2016, 11:42:08 PM Thanks stworthy, it works.
|