EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 07, 2024, 05:09:11 PM
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
>
EasyUI for jQuery
>
Problem with checkbox field in datagrid-groupview
Pages: [
1
]
« previous
next »
Print
Author
Topic: Problem with checkbox field in datagrid-groupview (Read 11239 times)
patana
Jr. Member
Posts: 50
Problem with checkbox field in datagrid-groupview
«
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
Re: Problem with checkbox field in datagrid-groupview
«
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
Re: Problem with checkbox field in datagrid-groupview
«
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
Re: Problem with checkbox field in datagrid-groupview
«
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
Re: Problem with checkbox field in datagrid-groupview
«
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
Re: Problem with checkbox field in datagrid-groupview
«
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
Re: Problem with checkbox field in datagrid-groupview
«
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
« 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...