zoukankan      html  css  js  c++  java
  • WebDatagrid-左边的checkbox决定右边的文本是否进入编辑状态

    Assuming you are using templates for the check box column and the checkbox is the only control in that template, something like the following can be used for your scenario.

    确定你用的是templates 的checkbox行,并且该模板中只有checkbox一个空间。

    Handle the EnteringEditMode event off of the CellEditing behavior.添加一个EnteringEditMode 事件

    <ig:EditingCore>
    
          <Behaviors>
    
                <ig:CellEditing>
    
                      <CellEditingClientEventsEnteringEditMode="enteringEditMode" />
    
                </ig:CellEditing>
    
          </Behaviors>
    
    </ig:EditingCore>

    The event handler may look like this:事件函数如下:

    function enteringEditMode(grid, eventArgs)
    
    {
    
          var cell = eventArgs.getCell();
    
     
    
          if (cell.get_column().get_key() == "SecondColumn")
    
          {
    
                checkboxCell = cell.get_row().get_cellByColumnKey("FirstColumn");
    
                if (!checkboxCell.get_element().firstChild.checked)
    
                      eventArgs.set_cancel(true);
    
          }
    
    }
  • 相关阅读:
    移动web开发之flex布局(弹性布局)
    移动web开发之流式布局
    移动端基础
    3D变形(CSS3) transform
    动画(CSS3) animation
    2D变形(CSS3) transform
    过渡(CSS3)
    CSS精灵技术(sprite)
    字体图标
    伸缩布局(CSS3)
  • 原文地址:https://www.cnblogs.com/sizhizhiyue/p/5006512.html
Copyright © 2011-2022 走看看