EasyUI Forum
May 09, 2024, 05:39:29 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: all lines in datagrid gets selected after content reload  (Read 13386 times)
mzeddd
Full Member
***
Posts: 223



View Profile
« on: June 12, 2013, 03:33:05 AM »

If I have no selected lines in my datagrid and call reload I have no problems

But once I select line and call reload of this datagrid then I have all loaded lines selected

It is visible with 1.3.3 (with 1.3.2 I had no problems like this) in Firefox and in Opera.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: June 12, 2013, 05:21:28 AM »

Here is the datagrid example http://www.jeasyui.com/demo/main/index.php?plugin=Application&theme=default&dir=ltr&pitem=Basic%20CRUD. It has no problem you pointed out.

Please provide an example to demonstrate your issue.
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #2 on: June 13, 2013, 04:36:50 AM »

Hi,

I have found the reason of this problem.
This is how I had in my file:

Code:
<script>
$(function(){
$('#dg').datagrid({
title:'dg',
animate:false,
url:'../datagrid/datagrid_data1.json',
singleSelect:true,
idField:'id',
columns:[[
{field:'itemid',title:'itemid',width:100},
{field:'productid',title:'productid',width:150}
]]
});
});
function test(){
$('#dg').datagrid('reload');
}
</script>

idField:'id' has to be idField:'itemid'
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!