zoukankan      html  css  js  c++  java
  • Ext复制grid里某一列的值

    ExtAspNet确实封装Ext封装的不错,但是一些Ext的弊端还是有点影响它的完美!

    第一个问题:Grid列的值不能选中,所以也就不能复制,这对于显示内容必然是个弊端。

    解决方法:

    step1:添加css样式。
    CSS代码
    <style type= "text/css" >  
      .x-selectable, .x-selectable * {  
      -moz-user-select: text! important ;  
      -khtml-user-select: text! important ;  
      }  
    </style>  
    step2:修改Ext.grid.GridPanel 的protoType,我是自己写了一个新的js文件,记得要在ext-all.js后面引入。
    JavaScript代码
    if (!Ext.grid.GridView.prototype.templates) {  
      Ext.grid.GridView.prototype.templates = {};  
    }  
    Ext.grid.GridView.prototype.templates.cell = new Ext.Template(  
      '<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} x-selectable {css}" style="{style}" tabIndex="0" {cellAttr}>' ,  
      '<div class="x-grid3-cell-inner x-grid3-col-{id}" {attr}>{value}</div>' ,  
      '</td>'  
    );  

    第二个问题:DatePicker不能选择时分秒,如果你说可以是不是用到了DateFormatString,这个东东太忽悠人了。表面上是可以选择了,但是在通过后台数据设置它的值是怎么都显示不了值。

    解决方案:不用datePicker获取时分秒,自己另外写个textbox加个正则获取设置吧。 

  • 相关阅读:
    c#下实现ping操作
    DevExpress 经典常用功能代码收集
    WPF – 使用触发器
    XtraGrid使用方法
    [读书笔记]STL源码剖析
    [微软面试100题]6170
    [读书笔记]Thinking in C++
    [转][算法]google page rank算法
    [微软面试100题]7180
    [转][算法]链接分析算法之:HITS算法
  • 原文地址:https://www.cnblogs.com/gudao119/p/1760387.html
Copyright © 2011-2022 走看看