zoukankan      html  css  js  c++  java
  • EasyUI的columns中列标题居中

    $("#supDataList").datagrid({
       url: "../Ajax/SupplierAjax.ashx",
       queryParams:
      {
       cmd: "getSup",
       strWhere: strWhere
      },
      fitColumns: true,//真正的自动展开/收缩列的大小,以适应网格的宽度,防止水平滚动。
      pagination: true, //允许分页
      rownumbers: true, //行号
      singleSelect: false,//true只能选择一行
      striped: true, //奇偶行是否区分
      checkOnSelect: true,
      onDblClickRow: function (rowIndex, rowData) {//双击一行时触发
     
             EditSup(rowData.sup_Id, rowData.sd_DeId);//编辑 
      },
      pageSize: 50, //设置默认每页20条记录
      pageList: [10, 50, 100, 1000, 5000],//可自定义每页显示多少条记录

      columns: [[
      {
         field: "row",
         checkbox: true
      },
      {
          field: "sup_Id",
          title: "操作",
          align: "center",
          "60",
         formatter: function (value, row, index) {
            var str = "<a id='deepRed' href='javascript:void(0)' onclick='DelSup(" + row.sup_Id + "," + row.sd_DeId + ")' title='删除' >✘</a>&nbsp;&nbsp;&nbsp;&nbsp;<a id='green'          href='javascript:void(0)' onclick='EditSup(" + row.sup_Id + "," + row.sd_DeId + ")' title='编辑'>➷</a>";
                       return str;
         }
       },
      {
       field: "sup_Code",
       title: "编码",
       align: "center",
        "90"
      },
      {
       field: "sup_Name",
       title: '<span class="txtcenter">名称</span>',
        "200"
       },
     
     ]],
     onLoadSuccess: function (data) {
     $(".txtcenter").parent().parent().css("text-align", "center");
     },

    });

  • 相关阅读:
    基于遗传算法(Genetic Algorithm)的TSP问题求解(C)
    分治思想:合并排序和快速排序
    冒泡排序和选择排序
    WPF线程
    DataGrid属性和事件
    WPF限制TextBox只能输入数字
    键盘键值对应表
    转换人民币大小金额
    查找DataGrid某个单元格中的控件
    WPF中DataGrid使用初步
  • 原文地址:https://www.cnblogs.com/weimingxin/p/7088261.html
Copyright © 2011-2022 走看看