单据体行高、列表行高设置 (详细)
单据体行高设置可以通过两种方法实现:
1 表单插件实现
1.1 C#写法
在BOSIDE中,
代码:
public class TestrowHeigth : AbstractDynamicFormPlugIn
{
public override void AfterBindData(EventArgs e){
this.View.GetControl<EntryGrid>("FEntity").SetRowHeight(80);
base.AfterBindData(e);
}
}
效果图:
1.2 Python写法
Python代码:
import clr
clr.AddReference('System')
clr.AddReference('Kingdee.BOS.Core')
from Kingdee.BOS.Core.DynamicForm import *
from Kingdee.BOS.JSON import *
def AfterBindData(e):
this.View.GetControl("FEntity").SetRowHeight(80);
效果图:
2. 表单构建插件
2.1 C#写法
代码:
public class TestrowHeight : AbstractDynamicWebFormBuilderPlugIn
{
public override void CreateControl(CreateControlEventArgs e){
string controlKey = e.ControlAppearance.Key;
if (controlKey.EqualsIgnoreCase("FENTITY")) // FENTITY为唯一标识
{ e.Control["rowheight"] = 80;
}
}
}
2.2 Python写法
Python代码:
import clr
clr.AddReference('Kingdee.BOS')
clr.AddReference('Kingdee.BOS.Core')
clr.AddReference('Kingdee.BOS.DataEntity')
from Kingdee.BOS.Util import *
from Kingdee.BOS.Core.DynamicForm import *
from Kingdee.BOS.JSON import *
from System import *
def CreateControl (e) :
if (e.ControlAppearance.Key.Equals("FEntity",StringComparison.InvariantCultureIgnoreCase)): e.Control["rowheight"] = 80;
效果图:
列表行高设置
1 列表插件
1.1 C#写法
代码:
public class TestrowHeigth : AbstractListPlugIn
{
public override void OnLoad(EventArgs e) {
this.View.GetControl<EntryGrid>("FLIST").SetRowHeight(80);
base.OnLoad(e);
}
}
2.1 Python写法
Python代码:
import clr
clr.AddReference('System')
clr.AddReference('Kingdee.BOS.Core')
from Kingdee.BOS.Core.DynamicForm import *
from Kingdee.BOS.JSON import *
def OnLoad(e):
this.View.GetControl("FLIST").SetRowHeight(80);
效果图:
PS:
silverlight/GUI客户端可以设置根据文本内容自动调整单据体、列表行高(H5端暂不支持此功能),操作步骤如下:
1.没有勾选【只读单元格自动换行】:
2.勾选【只读单元格自动换行】:
单据体行高、列表行高设置 (详细)
本文2024-09-23 03:48:13发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-161198.html