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);
        }
    }

  • 相关阅读:
    Python学习笔记(四)多进程的使用
    Python学习笔记(三)多线程的使用
    windows无法安装msi文件
    标签传播算法
    信息论基础
    模块度Q
    HTTPS开发(SSL--用Tomcat服务器配置https双向认证)
    oracle 优化
    eclipse 界面开发--windowbuilder
    vba 读取数据库
  • 原文地址:https://www.cnblogs.com/perock/p/2352685.html
Copyright © 2011-2022 走看看