子表
更新时间: 2024-09-12

添加子表行AddRow()

示例:

var controlManager = this.D000001AccountList;//获取子表控件对象

        var subObjectId = $.IGuid();  //创建行ID

          controlManager.AddRow( subObjectId, {

              "D000001AccountList.AccountName": "赋值",

              "D000001AccountList.AccountClassification": "赋值",

              "D000001AccountList.OwnerIdName": "赋值"

        })

 

 

更新子表行UpdateRow ()

示例:

var currentRowId =   this.F67c89495df154ab69ede62c1b61a0658.GetValue()[0].ObjectId; //第一行子表ID                      this.F67c89495df154ab69ede62c1b61a0658.UpdateRow(   currentRowId, {

                      "F67c89495df154ab69ede62c1b61a0658.jyjg": "赋值",

                      "F67c89495df154ab69ede62c1b61a0658.dqgys": "赋值",

                      "F67c89495df154ab69ede62c1b61a0658.cpmc": "赋值"

                              });

 

清除子表行数据ClearRows ()

注:目前氚云未提供移除某一行的接口,需通过ClearRows+AddRow自行实现该功能

示例:

var details= this.D000001AccountList;//获取子表控件对象

 details.ClearRows(); //清除子表中的所有行

 

获取子表中的控件GetCellManager()

示例:

//获取子表第一行数据的ObjectId

var currentRowId =   this.F67c89495df154ab69ede62c1b61a0658.GetValue()[ 0 ].ObjectId;


//获取子表第一行数据中控件编码为"F67c89495df154ab69ede62c1b61a0658.F0000044"的控件对象

var cellObj = this.F67c89495df154ab69ede62c1b61a0658.GetCellManager(   currentRowId, "F67c89495df154ab69ede62c1b61a0658.F0000044" );


//设置控件不可写

cellObj.SetReadonly(true);


//设置控件不可见

cellObj.SetVisible(false);


//若F67c89495df154ab69ede62c1b61a0658.F0000044控件为下拉框、复选框、单选框控件,可以清空选项、添加选项

cellObj.ClearItems();

cellObj.AddItem("选项1");



获取子表数据行数GetRowsCount()

示例:

var rowsCount= this.F67c89495df154ab69ede62c1b61a0658.GetRowsCount();


Copyright(C)2023 HFBangFu Inc. All Rights Reserved 皖ICP备12017563号-5
收缩