Cuarcuiu
Cuarcuiu

Reputation: 527

JqGrid highlight row

The JqGrid script can show a list of record loaded with ajax procedure.

Example:

<table id="tab_Categorize"></table>
<script>
jQuery('#tab_Categorize').jqGrid({caption: 'Title',url: 'CategorizeAjax.php?a=123',...});
</script>

Can i view in the list the row (id 123) highlighted? Thank's.

Upvotes: 3

Views: 7059

Answers (1)

Oleg
Oleg

Reputation: 221997

If the row which you need highlight has the id 123 you can just use setSelection method for selecting:

jQuery('#tab_Categorize').jqGrid('setSelection', '123');

If you download the grid from the server you should place the code inside of loqdComplete callback, because the data can be selected only after there are loaded.

Upvotes: 2

Related Questions