EasyUI Forum
May 06, 2024, 10:55:57 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Problem with checkbox field in datagrid-groupview  (Read 11235 times)
patana
Jr. Member
**
Posts: 50


View Profile
« on: October 09, 2013, 09:12:28 PM »

When combining datagrid-groupview with checkbox field,
Code:
$(this).datagrid('getChecked').length
do not show the correct number of checked box.
Please help!
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 09, 2013, 11:26:00 PM »

Please refer to this example http://jsfiddle.net/dGmSu/. It can return the correct checked row count.
Logged
patana
Jr. Member
**
Posts: 50


View Profile
« Reply #2 on: October 11, 2013, 01:52:47 AM »

I found the problem. If i set idField:'id' to datagrid, then the number of checked row was incorrect.
Could I count the number of checked row base on grouped row?
« Last Edit: October 11, 2013, 02:20:29 AM by patana » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: October 11, 2013, 06:25:32 AM »

Here is the updated example that set idField field. It also works well.
http://jsfiddle.net/dGmSu/4/
Logged
patana
Jr. Member
**
Posts: 50


View Profile
« Reply #4 on: October 11, 2013, 07:01:15 PM »

I changed idField to productid, the problem occured. check here
Code:
http://jsfiddle.net/dGmSu/5/
Suppose I want to count checked row base on productid field, how?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #5 on: October 11, 2013, 07:24:56 PM »

You have set a wrong 'idField' value. The 'idField' value must be unique.
Logged
patana
Jr. Member
**
Posts: 50


View Profile
« Reply #6 on: October 13, 2013, 08:45:35 PM »

I see, But could i count checked row base on productid?
http://jsfiddle.net/dGmSu/7/
« Last Edit: October 13, 2013, 09:08:52 PM by patana » 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!