String isAsc = (i < isAscAry.length) ? isAscAry[i] : "asc";
search.addOrderBy(sortBy[i], !IGridEnum.SORTASC.getCode()
.equals(isAsc));
}
}
IGridResult result = null;
try {
result = (IGridResult) method.invoke(this, search, params);
result.setColumns(getColumns(params.get(IGridEnum.COL_PARAM
.getCode())));
result.setPage(page);
result.setPageCount(result.getRecords(), pageRows);
} catch (InvocationTargetException e) {
if (e.getCause() instanceof CapMessageException) {
throw (CapMessageException) e.getCause();
} else if (e.getCause() instanceof CapException) {
throw (CapException) e.getCause();