Hello,
Our user like to see the Checkbox on a grid is “Checked” when they click anywhere on a row.
I have tried the following code in "OnRowCliclick event but it is not working:
pui.set("chkBox", "1");
changeElementValue("chkBox", "1");
I am not sure it is possible to accomplish that.
Thank you,
onRowClick set Checkbox Checked
-
- New User
- Posts: 11
- Joined: Tue Sep 01, 2015 11:24 am
- First Name: Sayed
- Last Name: Mohsen
- Company Name: Astro-Med, Inc.
- Phone: 401-298-8605
- State / Province: Rhode Island
- Country: United States
- Contact:
- matt.denninghoff
- Profound Logic Staff Member
- Posts: 115
- Joined: Wed Feb 10, 2016 3:53 pm
- First Name: Matthew
- Last Name: Denninghoff
- Company Name: Profound Logic Software
- State / Province: Ohio
- Country: United States
- Contact:
Re: onRowClick set Checkbox Checked
There are a couple things needed to make your code work. First, when you call pui.set, the second parameter should be "value", and you'll need to set the "checked" property on the checkbox element. Second, when elements are inside a Grid, you must include a period and the row number when you are identifying them.
For example, this onrowclick code should check a box in the row, if the checkbox is named "chkBox":
I tested this on a checkbox with the "value" property bound to an indicator--format 1/0--the "checked value" property is 1, and the "unchecked value" property is 0.
For example, this onrowclick code should check a box in the row, if the checkbox is named "chkBox":
Code: Select all
pui.set("chkBox."+row, "value", "on" );
getObj("chkBox."+row).checked = true;
-
- New User
- Posts: 11
- Joined: Tue Sep 01, 2015 11:24 am
- First Name: Sayed
- Last Name: Mohsen
- Company Name: Astro-Med, Inc.
- Phone: 401-298-8605
- State / Province: Rhode Island
- Country: United States
- Contact:
Re: onRowClick set Checkbox Checked
Thanks Matt. It is working great now.
-Sayed
-Sayed
Who is online
Users browsing this forum: No registered users and 0 guests