EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
April 20, 2024, 03:51:23 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
General Discussion
>
eDataGrid destroyRow Error
Pages: [
1
]
« previous
next »
Print
Author
Topic: eDataGrid destroyRow Error (Read 5397 times)
thiago_brum
Newbie
Posts: 26
eDataGrid destroyRow Error
«
on:
May 31, 2016, 05:56:06 AM »
I have a eDataGrid ...
<table id="datagrid_item_pedido" title="Itens" idField="id" singleSelect="true">
<thead>
<tr>
<th field="action" width="18" data-options="formatter:function(value,row,index){ return '<a href=\'#\' onclick=\'deleteLine()\'>Delete</a>';}"></th>
<th field="cod_item" width="100">Item</th>
</tr>
</thead>
</table>
$('#datagrid_item_pedido').edatagrid({
});
function deleteLine(){
var row = $('#datagrid_item_pedido').datagrid('getSelected');
var index = $('#datagrid_item_pedido').datagrid('getRowIndex',row);
$('#datagrid_item_pedido').edatagrid('destroyRow',index);
}
I insert two lines in eDataGrid ...
$('#datagrid_item_pedido').edatagrid('addRow',{row:{cod_item:'Test1'}});
$('#datagrid_item_pedido').edatagrid('addRow',{row:{cod_item:'Test2'}});
If i click on the link "Delete" in the first line ("Test1"), the line disappears (it's ok).
Now, if I click again on "Delete" link on the left line ("Test2"), nothing happens.
Can someone help me with this problem?
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: eDataGrid destroyRow Error
«
Reply #1 on:
May 31, 2016, 07:50:39 PM »
Please try to download the newest 'jquery.edatagrid.js' file from
http://www.jeasyui.com/extension/edatagrid.php
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...