zoukankan      html  css  js  c++  java
  • 控制数据源中某一列是否允许编辑 FormDataObject allowEdit

    void updateDesign()
    {
        FormDataObject  fldItemName;

        // Only allow the item name to be modified if it's a service item
        //
        // Notice that this effects the controls both on the grid, and on the general tab.
        fldItemName = inventTable_DS.object(FieldNum(InventTable,ItemName));
        fldItemName.allowEdit(inventTable.ItemType == ItemType::Service);
    }

    //将所有Field禁止编辑

    To prevent editing code when you add fields to the table, call the fieldproperties using the dictionary classes:

    void SetFieldsAllowEdit()   // 这是数据源中的方法
    {
        FormDataObject  fldItemName;
        boolean         allowEdit = false; //This would set according to some criteria
        SysDictTable    dictTable = new SysDictTable(this.table());
        FieldId         currentFieldId;
        ;
        for (currentFieldId = dictTable.fieldNext(0); currentFieldId; currentFieldId = dictTable.fieldNext(currentFieldId))
        {
            fldItemName = this.object(currentFieldId);
            if (fldItemName)
                fldItemName.allowEdit(allowEdit);
        }
    }

  • 相关阅读:
    通过elasticsearch对日志进行搜索热词统计
    登陆获取shell时的配置文件加载过程
    linux共享库加载
    linux安全相关
    ELK常用API使用方法
    linux bash缓存
    redis主从架构及redis集群
    排查电脑的网络问题
    Logstash添加Protobuf解析插件
    Macaca上手体验
  • 原文地址:https://www.cnblogs.com/perock/p/2352685.html
Copyright © 2011-2022 走看看