Hi,
I don't use the datagrid edit extension, so I have a special column with a delete icon on it, and I am able to use a custom function to get the selected row and pass arbitrary parameters to the server.
For the grid column:
{field: 'dummy_action', title: 'Manage', align:'center', width: '8%',
formatter:function(value,row,index)
{
return '<a style="margin: 0 5px;" href="javascript:void(0)" onclick="deleteRowFunction(this, '+row.id+');"><img src="..." alt="" class="icon_del" /></a> '
}
and basics of the deleteRowFunction function
function deleteRowFunction(el, rowid)
{
// If you need the grid, then you can query from the current element up
var grid = jQuery(el).closest('.datagrid-wrap').find('.datagrid-f:first');
// If you need you can get the row index (not row id !!) starting from where the icon is
var tr = $(el).closest('tr.datagrid-row');
var rowIndex = parseInt(tr.attr('datagrid-row-index'));
// I use the destroyUrl (without the edatagrid.js) which you can get from the grid by
var opts = jQuery(grid).datagrid('options');
// and opts.destroyUrl is the param you specified at the grid init
// Now get the full row from the grid
var row = jQuery(grid).datagrid('getSelected');
// And finally you can either append to the destroyUrl any param since you have the full row
// Or if you have a database id in the dataset, then you don't need to query the full row, just use the rowid parameter to append it
// to the destroyUrl, eg.
var destroyUrl = opts.destroyUrl + '?id=' + rowid;
}
Hope this helps.