Reputation: 6899
While looping through the rows of an IG I want to be able to programmatically check row selector for a row where another column's value 'Test'. If it equals something else, I want to uncheck it. Is that possible?
I have something like that:
var model = this.data.model;
var records = this.data.selectedRecords;
if (records.length > 0) {
for (i = 0; i < records.length; i++) {
test_var = model.getValue (records[i], "FIELD1");
if(test_var=== 'Test'){
//check the row_selector here
}
}
}
Upvotes: 1
Views: 584
Reputation: 421
If you inspect that cell, you'll notice there's a SPAN within the cell. When the row selector is checked, it gets the "is-selected" class added to it. Might that work for you?
I can't say I'd know how to reference it, but you're clearly more comfortable with jQuery than I am, so if you work out the method, please share here.
Upvotes: 0