I saw your answer. I tried and it works. Then I tried to move the same logic to Javascript to do client side row hiding because I do not want to have postback to the server. However, it does not work. My code snippet is below. Could you be so kind to let me know why the following does not work? Thanks.
var templateGrid = $find(m_templateGridId);
var rowsLength = templateGrid.get_rows().get_length();
for (var i = 0; i < rowsLength; i++) {
var currentRow = templateGrid.get_rows().get_row(i);
currentRow.CssClass = "hiderow";
}
The style looks like this.
.hideRow {
visibility: hidden;
display: none;
}