EasyUI Forum
May 07, 2024, 02:37:17 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: datagrid with filter and checkbox  (Read 3625 times)
iLLuSia
Newbie
*
Posts: 12


View Profile Email
« on: March 11, 2020, 04:13:11 AM »

I have something like
Code:
$('#dg').datagrid({
    columns: [[ {field:'check', checkbox:true}, {...}
                 ]]
});
$('#dg').datagrid('enableFilter');
And when I do filter, all previously checked rows become unchecked. Neither $('#dg').datagrid('getChecked') returns the expected values, nor are the displayed rows after filtering no longer checked if they were before.

How do I solve this?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: March 16, 2020, 01:50:01 AM »

Please set the 'idField' property for your datagrid component.
Logged
iLLuSia
Newbie
*
Posts: 12


View Profile Email
« Reply #2 on: March 16, 2020, 06:16:13 AM »

That solved the issue. Thank you.
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!