Grid Row Select
Posted: Wed Jul 19, 2017 1:04 pm
I have tried javascript and bound field to the Row Select and I am not able to get it to work.
I want to set the Row Select based on whether or not the grid has rows.
I have tried this code in the onload of the control record format and the grid still executes the onrowclick. I may not be approaching this correctly. What is the best approach to prevent the onrowclick response when no rows have been loaded into the grid?
Thanks in advance!
I want to set the Row Select based on whether or not the grid has rows.
I have tried this code in the onload of the control record format and the grid still executes the onrowclick. I may not be approaching this correctly. What is the best approach to prevent the onrowclick response when no rows have been loaded into the grid?
Code: Select all
var rowCount = getObj("FilterGrid").grid.getRecordCount();
if (rowCount === 0) {
getObj("FilterGrid").grid.setProperty("row selection", "none");
} else {
getObj("FilterGrid").grid.setProperty("row selection", "single");
}