Row is undefined error in Gridpanel
Hello,
I am using ExtJs grid panel in my html pages. Following is the config and viewConifg of grid.
Code:
store : pageStore,
renderTo: 'app_page_content',
height : 350,
sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
loadMask :true,
viewConfig: {
autoFill :true,
enableRowBody:true,
showPreview:true,
getRowClass: function(record, rowIndex, p, store){
if(this.showPreview){
p.body='<div class="row-preview " style="margin-left: 10px;">'+record.data.action+'</div>';
return 'x-grid3-row-expanded';
}
return 'x-grid3-row-collapsed';
}
}
Its getting rendered to div. I can select only first row. When I click on other rows it gives me error that Row is undefined. Any idea why this error is coming up?