How do I allow the user to select rows in a displayed table so I can process just those rows?
It seems I would add a logical field to the database resource. I can see how to add a calculated field, but I don't see how to make one where the User can hit a checkbox and then via a script I can identify the checked ones.
EDIT: Here's the solution I came up with (from another answer on the forum)...
I added a booleon field to the table (not the resource).
Placed that field at the left column of my table and at that point, it works as if it was part of the recordset.
I can see if it's checked once I'm pointing to a row with:
tables.GRADES.ISROWSELECTED.value
I also added a SelectAll checkbox at the above the table and put this code:
var rows = tables.GRADES.rows;
while (rows.next())
{
tables.GRADES.ISROWSELECTED.value = fields.SELECTALL.value;
}
User Select rows in table?
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 12
- Joined: Sat Apr 04, 2015 3:43 pm
- Contact:
-
- Ebase User
- Posts: 649
- Joined: Mon Dec 09, 2013 6:37 pm
The table has a Select Column property. Click on the table in designer and on the right hand side under Table Control there's the property Show select column. This will automatically add a checkbox next to each row. In the event, you could then loop through all rows and determine which ones are selected like this:
Code: Select all
var allRows=tables.MYTABLE;
var rows=allRows.getRows();
while (allRows.next()) {
if (allRows.isRowSelected()==true) {
// do something here if the row is selected
}
}
0 x
Who is online
Users browsing this forum: No registered users and 23 guests