EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: iLLuSia on March 11, 2020, 04:13:11 AM



Title: datagrid with filter and checkbox
Post by: iLLuSia 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?


Title: Re: datagrid with filter and checkbox
Post by: jarry on March 16, 2020, 01:50:01 AM
Please set the 'idField' property for your datagrid component.


Title: Re: datagrid with filter and checkbox
Post by: iLLuSia on March 16, 2020, 06:16:13 AM
That solved the issue. Thank you.