var dataSource = new kendo.data.DataSource({
transport: {
dataType: "json",
read: inputUri + $stateParams.subjectID,
},
pageSize: 10,
});

$scope.mainGridOptions = {
dataSource: dataSource,
//height: 420,
scrollable: false,
sortable: true,
filterable: true,
//pageable: {
// refresh: true,
// pageSizes: true,
// buttonCount: 5
//},
selectable: true,
columns: [
{
field: "Name",
title: "Input Name",
width: "300px"
},
{
field: "Value",
title: "Value",
template: '<input type="text" value="#= Value#" />'
},
{
field: "Page",
title: "Page",
template: '<input type="text" value="#= Page#" />'
}
],
dataBound: function () {
this.expandRow(this.tbody.find("tr.k-master-row").first());
},
noRecords: true
};

$scope.detailGridOptions = function (dataItem) {
return {
dataSource: {
transport: {
dataType: "json",
read: baseUri + $stateParams.documentID,
},
filter: { field: "InputID", operator: "eq", value: dataItem.ID }
},
scrollable: true,
sortable: true,
pageable: false,
columns: [
{ title: "ID", width: "50px", template: "<span class='row-number'></span>" },
{ field: "OptionValue", title: "Value", template: "#if(OptionValue == null) {#<textarea style='width:90%'></textarea>#} else{##:OptionValue##}#" },
{ field: "Page", title: "Page", width: "80px", template: "#if(Page == null) {#<input type='text' style='width:90%'/>#} else{##:Page##}#" },
{ template: '<input type="checkbox" #= IsAnswer ? \'checked="checked"\' : "" # class="chkbx" ng-click="checkboxClicked(dataItem)"/>', width: "80px" }
],
selectable: true,
dataBound: function () {
var rows = this.items();
$(rows).each(function () {
var index = $(this).index() + 1;
var rowLabel = $(this).find(".row-number");
$(rowLabel).html(index);
});
}
};
};

AngularJS +Kendo UI Grid template的更多相关文章

  1. Kendo UI Grid 使用总结

    Kendo UI Grid控件的功能强大,这里将常用的一些功能总结一下. Kendo UI Grid 固定列 在使用Gird控件显示数据时,如果数据列过多,会出现横向滚动条,很多情况下,我们希望某些列 ...

  2. Kendo UI Grid 批量编辑使用总结

    项目中使用Kendo UI Grid控件实现批量编辑,现在将用到的功能总结一下. 批量编辑基本设置 Kendo Grid的设置方法如下: $("#grid").kendoGrid( ...

  3. kendo ui grid选中行事件,获取combobox选择的值

    背景: 以前用 telerik ui做的grid现在又要换成kendo ui,不过说句实话kendo ui真的比telerik好多,可以说超级升级改头换面.当然用的mvc的辅助方法,以前的teleri ...

  4. Asp.net mvc Kendo UI Grid的使用(二)

    上一篇文章对Kendo UI做了一些简单的介绍以及基本环境,这篇文章来介绍一下Grid的使用 先上效果图: 要实现这个效果在Controller在要先导入Kendo.Mvc.UI,Kendo.Mvc. ...

  5. [Asp.net mvc] Asp.net mvc Kendo UI Grid的使用(四)

    有段时间没写博客了,工作状态比较忙,抽空继续总结下Grid的使用,这次主要介绍模板以及其他官网介绍不详尽的使用方法.先Show出数据,然后讲解下.后台代码: public ActionResult O ...

  6. 封装扩展Kendo UI Grid

    封装后的代码如下: function DataGrid(options) { this.options = { height: "100%", sortable: true, re ...

  7. kendo ui grid控件在选择行时如何取得所选行的某一列数据

    $("#grid").kendoGrid({ dataSource: dataSrc, columns: [ { template: '#=material_id#', width ...

  8. kendo ui grid 汉化

    加入js引用 <link href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.common.min.css" r ...

  9. Asp.net mvc Kendo UI Grid的使用(三)

    上一篇的操作已经能够显示基本数据了,这次介绍一下如何进行数据操作以及显现自定义命令. 第一步当然还是准备数据: [HttpPost] public ActionResult PersonalList_ ...

随机推荐

  1. mongodb 使用mongodump备份 指定用户名密码 出现错误 Failed: error connecting to db server: server returned error on SASL authentication step: Authentication failed

    mongodb 使用mongodump备份 指定用户名密码 出现错误 [root@MongoDB ~]# mongodump --host -u admin -p -d db1 -o /root/ F ...

  2. python之以字符串形式导入模块

    示例 调用方法 class CorsMiddleware: def process(self): print('from auth.cors.CorsMiddleware.process') cors ...

  3. Asp.net Core Mvc EF- Migrations使用

    Migragtion的命令,左边是手动命令,右边是代码方式 首先来看命令方式: 创建一个mvc项目,默认已经集成了EF包 创建的项目包含了Microsoft.AspNetCore.Identity.E ...

  4. hive sql执行的job在map时报java.lang.OutOfMemoryError的错误

    较为详细且重要的一段报错信息是org.apache.hadoop.mapred.YarnChild: Error running child : java.lang.OutOfMemoryError: ...

  5. 把vim插入状态的光标改为竖线

    和终端有关系,如果是Konsole的终端,把下面两行加到.vimrc文件里就可以 let &t_SI = "\<Esc>]50;CursorShape=1\x7" ...

  6. 200. Number of Islands(DFS)

    Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surro ...

  7. Vue系列之 => webpack基础使用

    webpack安装方式 1,运行 npm i webpack -g 全局安装. 2,在项目根目录中运行 npm i webpack --save-dev 安装到项目依赖中 项目目录 进入src运行, ...

  8. AARRR海盗模型简介

    整理下AARRR模型的概念.实际应用场景等问题,初步感觉这个模型主要应用在APP应用分析中. 1.什么是AARRR模型 AARRR是Acquisition.Activation.Retention.R ...

  9. Python自然语言处理笔记【一】文本分类之监督式分类

    一.分类问题 分类是为了给那些已经给定的输入选择正确的标签. 在基本的分类任务中,每个输入都被认为与其他的输入是隔离的.每个类别的标签集是预先定义好的(只有把类别划分好了,才能给输入划分类别). 分类 ...

  10. 【Bcftools】合并不同sample的vcf文件,通过bcftools

    通过GATK calling出来的SNP如果使用UnifiedGenotype获得的SNP文件是分sample的,但是如果使用vcftools或者ANGSD则需要Vcf文件是multi-sample的 ...