EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 21, 2024, 10:18:13 AM
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
>
Checkbox issue with multiple datagrids (old easyUI version)
Pages: [
1
]
« previous
next »
Print
Author
Topic: Checkbox issue with multiple datagrids (old easyUI version) (Read 4690 times)
sectioni
Jr. Member
Posts: 67
Checkbox issue with multiple datagrids (old easyUI version)
«
on:
October 28, 2018, 12:05:36 PM »
Hi,
I have a system with easyUI 1.5.1
I have styled it's checkboxes using the <label for="..."> css trick. (i've added a label element to your core)
When i have a page with a datagrid, and then i open a Modal with another datagrid, checking a checkbox in the Modal causes the checkbox to get checked in the datagrid underneath.
That's because both checkboxes have the same ID. (i.e. ck_2)
This issue does not reproduce with easyUI 1.6.2 since the ID of the second datagrid (in the Modal) is 'ck-1_2'.
So I'm assuming you've fixed it at some point.
Can you give me the specific code fix for that? Because I can't upgrade the framework on that system due to QA issues.
Thanks
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Checkbox issue with multiple datagrids (old easyUI version)
«
Reply #1 on:
October 28, 2018, 05:11:10 PM »
Quote from: sectioni on October 28, 2018, 12:05:36 PM
I have styled it's checkboxes using the <label for="..."> css trick. (i've added a label element to your core)
The checkboxes in the datagrid have no 'id' attribute. Could you please show an example to demonstrate your issue?
Logged
sectioni
Jr. Member
Posts: 67
Re: Checkbox issue with multiple datagrids (old easyUI version)
«
Reply #2 on:
October 29, 2018, 04:58:18 AM »
You're right.
It appears one of our developers added it using:
id="' + field + '_' + rowIndex + '"
inside:
renderRow: function(target, fields, frozen, rowIndex, rowData)
so for some reason rowIndex in 1.6.2 knows how to handle a situation with mulitple grids in the dom and 1.5.1 doesn't.
is there a way for me to add this fix to 1.5.1?
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: Checkbox issue with multiple datagrids (old easyUI version)
«
Reply #3 on:
October 29, 2018, 04:58:27 PM »
Please try to call this statement to generate the id value.
Code:
var id = $(target).data('datagrid').rowIdPrefix+'-'+field+'-'+rowIndex;
Logged
sectioni
Jr. Member
Posts: 67
Re: Checkbox issue with multiple datagrids (old easyUI version)
«
Reply #4 on:
October 31, 2018, 10:14:37 AM »
works. thanks
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...