Here is a brief grid code:
<s:url id="remoteurl" action="jsontable"/>
<sjg:grid
id="gridtable"
caption="Items Result"
formIds="gridSearchForm"
reloadTopics="reloadItemsGrid"
dataType="json"
href="%{remoteurl}"
pager="true"
gridModel="gridModel"
rowList="10,15,20"
rowNum="15"
rownumbers="true"
navigator="true"
navigatorSearch="true"
navigatorRefresh="true"
viewrecords="true"
width="600"
pagerInput="false"
pagerPosition="center"
recordpos="right"
direction="rtl"
onSelectRowTopics="rowselect">
<sjg:gridColumn name="title" index="title" title="title" sortable="false"/>
<sjg:gridColumn name="price" index="price" title="price" formatter="integer"/>
and subscription function:
$.subscribe('rowselect', function(event, data) {
alert('Selected Row : ' + event.originalEvent.id);
});
Access to id is the identifier event.originalEvent.id of the row from the element database.
How can I access the price parameters and the name of the selected row? Can someone give an example of using syntax? is it through data or event?
Thank!
Blend source
share