kendo UI --- 金额合计

视图代码:

<legend>应收情况</legend>
<%= Html.Kendo().Grid<Charge_PayConditionsQuery_En>()
      .Name("grid_Charge_PayConditionsQuery_En")
      .Columns(columns =>
      {
          columns.Bound(p => p.ItemName).Width(50);
          //columns.Bound(p => p.InvoiceTypeName).Title("发票类型名称").Width(100);
          columns.Bound(p => p.ShouldAmount).Width(50).Format("{0:N}").HtmlAttributes(new { style = "text-align: right;" })
              .ClientGroupFooterTemplate("<span style=‘float: right;‘> 金额: #=kendo.toString(sum,‘N‘)# </span>")                 //分组的总金额
              .ClientFooterTemplate("<span style=‘float: right;‘>总金额: #=kendo.toString(sum,‘N‘)# </span>");                    //全部分组的总金额
          columns.Bound(p => p.ReduceAmount).Width(50).Format("{0:N}").HtmlAttributes(new { style = "text-align: right;" })
              .ClientGroupFooterTemplate("<span style=‘float: right;‘> 金额: #=kendo.toString(sum,‘N‘)# </span>")
              .ClientFooterTemplate("<span style=‘float: right;‘>总金额: #=kendo.toString(sum,‘N‘)# </span>");
          columns.Bound(p => p.BufferAmount).Width(50).Format("{0:N}").HtmlAttributes(new { style = "text-align: right;" })
              .ClientGroupFooterTemplate("<span style=‘float: right;‘> 金额: #=kendo.toString(sum,‘N‘)# </span>")
              .ClientFooterTemplate("<span style=‘float: right;‘>总金额: #=kendo.toString(sum,‘N‘)# </span>");
          columns.Bound(p => p.OccurAmount).Width(50).Format("{0:N}").HtmlAttributes(new { style = "text-align: right;" })
              .ClientGroupFooterTemplate("<span style=‘float: right;‘> 金额: #=kendo.toString(sum,‘N‘)# </span>")
              .ClientFooterTemplate("<span style=‘float: right;‘>总金额: #=kendo.toString(sum,‘N‘)# </span>");

              //.ClientGroupFooterTemplate("<div style=\"text-align:right;\">开票金额:#=kendo.toString(sum,‘N‘)#</div>");
          columns.Bound(p => p.ArrearageAmount).Width(50).Format("{0:N}").HtmlAttributes(new { style = "text-align: right;" })
              .ClientGroupFooterTemplate("<span style=‘float: right;‘> 金额: #=kendo.toString(sum,‘N‘)# </span>")
              .ClientFooterTemplate("<span style=‘float: right;‘>总金额: #=kendo.toString(sum,‘N‘)# </span>");
          columns.Bound(p => p.RefundAmount).Width(50).Format("{0:N}").HtmlAttributes(new { style = "text-align: right;" })
              .ClientGroupFooterTemplate("<span style=‘float: right;‘> 金额: #=kendo.toString(sum,‘N‘)# </span>")
              .ClientFooterTemplate("<span style=‘float: right;‘>总金额: #=kendo.toString(sum,‘N‘)# </span>");
          columns.Bound(p => p.ReduceRemark).Width(50);
          columns.Bound(p => p.BufferDate).Width(50);
          columns.Bound(p => p.Remark).Width(50);
          columns.Bound(p => p.LatoryName).Hidden(true);
          //columns.Command(p =>
          //{
              // p.Custom("InvoiceReprint").Click("InvoiceReprint").Text("补打");
              // p.Custom("InvoiceReplace").Click("InvoiceReplace").Text("替换");
          //}).Width(200).Title("操作") ;

      })

      .Selectable(selectable => selectable
      .Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
      //.Pageable()
      .Sortable(p => p.SortMode(GridSortMode.SingleColumn))
      //.Scrollable(p=>p.Virtual(true))
      .Filterable()
      .ColumnMenu()

      .DataSource(dataSource => dataSource
      .Ajax()

      .Model(model => model.Id(p => p.OrderDetailID))

      .Aggregates(p =>
        {
            p.Add(t => t.OccurAmount).Sum();
            p.Add(t => t.ShouldAmount).Sum();
            p.Add(t => t.ReduceAmount).Sum();
            p.Add(t => t.BufferAmount).Sum();
            p.Add(t => t.ArrearageAmount).Sum();
            p.Add(t => t.RefundAmount).Sum();

        })                                                                                     //对字段(money类型)所对应的值进行相加
      .Group(p =>
        {
            p.AddDescending(t => t.LatoryName);

        })                                                                                     //分组字段

      .Read(read => read.Action("PersonChargeInfo_Read", "PersonalManager").Data("func_GetPersonidForRead"))
)

时间: 2024-08-09 04:54:13

kendo UI --- 金额合计的相关文章

Kendo UI for Angular 2 控件

Kendo UI for Angular 2 控件 伴随着 Angular 2 的正式 release,Kendo UI for Angular 2 的第一批控件已经发布了,当前是 Beta 版本,免费使用. 官方站点:Kendo UI for Angular 2 Kendo UI for Angular 被打包成独立的多个 NPM package,在 Progress NPM 之下 ( https://registry.npm.telerik.com/ ), 要想访问它,你需要一个激活的 Te

Kendo UI Grid 模型绑定

开篇 接触 Asp.net MVC 时间较长的童鞋可能都会了解过模型绑定(Model Binding),而且在一些做 Web 项目的公司或是Team面试中也经常会被问到.项目中有很多 Action 中都使用了自定义的模型绑定,但是业务逻辑太过复杂不适合做为例子与大家分享,而今天在做一个 Kendo UI 的功能时觉得可以用 Kendo UI 做为例子与大家分享与探讨一个典型的 Model Binding 的过程. 写的比较随性,欢迎大家讨论及拍砖! 背景介绍 Kendo UI: 它是一个非常出名

Kendo UI 使用札记

AutoComplete // html <input class="chooseCountry" type="text"/> // js $(document).ready(function () { var data = [ "中国", "中国台湾", "中国断臂山", "日本", "台湾" ]; //create AutoComplete UI co

kendo ui的treeView节点点击事件修改和grid的配置的一点总结

kendo-ui的treeView节点(node)点击时  可以触发一个select的事件(event),并且连续点击多次相同节点,可以触发并且只能触发一次该事件. 可是需求上需要实现:每次点击相同的节点,都要触发该select事件. 这个需求,是和kendo的select事件相悖的. 最开始想通过 外部手动触发select事件,但是发现并不能做到. 后来做了如下配置: $("#treeview").kendoTreeView({ dataSource: [ treeData ], s

集成 Kendo UI for Angular 2 控件

伴随着 Angular 2 的正式 release,Kendo UI for Angular 2 的第一批控件已经发布了,当前是 Beta 版本,免费使用. 官方站点:Kendo UI for Angular 2  Kendo UI for Angular 被打包成独立的多个 NPM package,在 Progress NPM 之下 ( https://registry.npm.telerik.com/ ), 要想访问它,你需要一个激活的 Telerik account , 如果你现在还没有这

Kendo UI常用示例汇总(十四)

Kendo UI Professional 提供开源和商业两个版本.开源版 Kendo UI Core,有40+个框架和组件:商业版整合了之前的Kendo UI Web.Kendo UI Mobile 和 Kendo UI DataViz ,一共有70+个框架和组件.作为Kendo UI的升级版,Kendo UI Professional既可以开发网页版应用程序,也可以开发移动版应用程序,并且在性能上也有显著的优化和提升. Kendo UI Professional试用版下载猛戳>> Kend

kendo ui中grid页面参数问题(1)

kendo ui 中grid 算是最长用的控件之一,当使用分页效果时,我们要传递分页参数与自己定义的参数如: 1 var dataSource = new kendo.data.DataSource({ 2 transport: { 3 read : { 4 url : "对应后台路径", 5 contentType : "application/json", 6 type : "POST", 7 dataType : "json&qu

Telerik Kendo UI 那点事【3】

中文化之后,我们开始具体使用kendo ui组件.经常开发系统的我,通常从最常用的控件用起,那就是表格控件GridView!现在的软件系统基本上就是标签框.文本框.选择框.树.表格堆砌而成.因此接触任何一种UI组件的时候,我通常都最为关注GridView,表格控件.小小的表格控件,做的好,能够给前端呈现和使用带来很好的感受的同时,还能够大幅度降低开发的工作量. Kendo UI在这方面让我十分满意,甚至是震惊.因为它的GridView不仅仅是能够简单的在呈现层进行数据的过滤.排序.分组,关键是还

两大HTML5框架评测:Kendo UI 和 jQuery Mobile

jQuery Mobile 和 Kendo UI 都是流行的 JavaScript 框架,在开发中我们可以在它们的基础上添砖加瓦制作所有现代移动WEB应用.这两个框架都是基于使用率顶尖的 JavaScript 库 jQuery 所构建的.比较 Kendo UI 和 jQuery Mobile 有些类似于比较同一枚硬币的两面.众所周知,jQuery Mobile 实际上并不需要太多的介绍,因为它是最常用的HTML5框架之一. Kendo UI 具有相似的动机和类似的发展速度.与 jQuery Mo