kendo-ui - 如何使用kendo模式对话框对每个记录使用Angularjs的细节?

  显示原文与译文双语对照的内容
0 0

我使用in网格来显示数据,我一直在寻找解决方案,使用 Angular 对话框中的kendo.once 用户单击细节。

到目前为止,我已经实现了 below 代码。

HTML


<div kendo-grid="lrrSearchGrid" options="lrrSearchGridOptions">
 </div>

CTRL.JS


$scope.lrrSearchData = {};
$scope.lrrSearchData = null;

$scope.mappedLRRSearchData = {};
$scope.mappedLRRSearchData = null;

//Search
$scope.searchLRRs = function () {
 SubCategory.searchLRRBasedOn(1, $scope.search.searchBy, $scope.search.searchParam).then(function (data) {
 $scope.lrrSearchData = data.data;
 $scope.lrrSearchGrid.setDataSource(new kendo.data.DataSource({
 data: $scope.lrrSearchData,
 pageSize: 5
 }));
 }, function (err) {
 if (err.status === 404) {
 $scope.searchError = 'No Records Found';
 }
 });
};


$scope.gotoSubCats = function() {
 $state.go('app.subCats');
};

//Setting the LRR Search Data
$scope.lrrSearchGridOptions = lrrSearchGridConfig.lrrSearchGrid;
lrrSearchGridConfig.lrrSearchGrid.dataSource = resetLRRSearchData();

$scope.mappedLRRGridOptions = lrrSearchGridConfig.mappedLRRGrid; 
lrrSearchGridConfig.mappedLRRGrid.dataSource = resetMappedLRRSData();

Config.js


lrrSearchGrid: {
 sortable: true,
 pageable: {
 previousNext: false,
 pageSizes: false
 },
 scrollable: true,
 filterable: true,
 columns: [
 { 
 field: 'regionName',
 title: 'Jurisdiction',
 width: '32px'
 }, {
 field: 'regInvetoryName',
 title: 'Inventory',
 width: '32px'
 },{
 field: 'ruleIdentifier',
 title: 'Rule Id',
 width: '25px'
 }, {
 field: 'citationValue',
 title: 'Rule Citation',
 width: '30px'
 }, {
 field: 'ruleName',
 title: 'Rule Standard Name',
 width: '30px'
 }, {
 field: 'subPartId',
 title: 'Subpart Id',
 width: '30px'
 }, {
 field: 'subpartCitation',
 title: 'Subpart Citation',
 width: '40px'
 }, {
 field: 'subpartRuleName',
 title: 'Subpart Standard Name',
 width: '40px'
 },{
 field: 'Detail',
 title: 'Action',
 width: '40px',
 filterable:false,
 template : function(dataItem) {
 if (typeof dataItem.lrrDetail =="string") {
 return"<a href=</a>";
 } 
 }
 }
 ]
}

谢谢你的帮助,我会感激。

时间: 原作者:

0 0

我已经创建了一个同样的方法,检查它是否有助于你: http://jsfiddle.net/Sowjanya51/6r01vccj/3/


 you can use the custom command option of kendo grid to achieve this.

原作者:
...