【发布时间】:2015-09-22 07:29:22
【问题描述】:
控制器:
onSelectRow :
function(id){
setTimeout(function () {$scope.getSelectedRow(); }, 0);
},};
$scope.getSelectedRow = function(){
var grid = $("#patientgrid");
var rowKey = grid.jqGrid('getGridParam',"selrow");
var kelr = grid.jqGrid('getCell', rowKey, 'PostTopic');
if (rowKey)
{
$scope.lastsel=kelr;
}
else
alert("No rows are selected");}
HTML:
<h1>Topic:{{lastsel}}</h1>
问题是... 当我选择新行时,“lastsel”不会改变。
【问题讨论】:
标签: javascript jquery angularjs jqgrid