在 FinalBuilder Action Studio -StandardGrid(Component Palette)
1.如何更改列名(Key、Value)?
2.如何添加键值?
3.如何在visual studio中检索(key,value)中的值?
我尝试了所有选项,还有其他方法可以在 Action Studio 中以表格方式添加数据。
但我觉得这是可能的,因为最终构建器中的发送电子邮件操作支持数据网格。但我不知道怎么做。
在 FinalBuilder Action Studio -StandardGrid(Component Palette)
1.如何更改列名(Key、Value)?
2.如何添加键值?
3.如何在visual studio中检索(key,value)中的值?
我尝试了所有选项,还有其他方法可以在 Action Studio 中以表格方式添加数据。
但我觉得这是可能的,因为最终构建器中的发送电子邮件操作支持数据网格。但我不知道怎么做。
答案依次是:
如果网格名为“GridExludeItems”,则在属性页的 ReadData 脚本中添加以下内容;
Page.GridExcludeItems.TitleCaptions.Strings(0) = "排除类型" Page.GridExcludeItems.TitleCaptions.Strings(1) = "排除值"
要追加一行(同时添加键和值),请使用以下命令;
Page.GridExcludeItems.InsertRow(excludedType, excludeValue, true);
To retrieve these values in visual studio they need to be added to be saved back to a property on the action. The ReadData action is to be used to Read values from the properties of the action and place them into the GUI controls. If bindings are used this isn't required. Bindings are found on the GUI control in the visual designer. Also the types have to match, so for the Standard Grid a string list is used.
So define a property with the type of "strings" (not string, but the plural), and name it something meaningful. Then in the .net action code, the class would have inherited from the VSoft.StandardAction. From this the validate, execute, and loaded might be overridden. In these the a context is passed. The property can be accessed from the property like so.
var myGridsStrings = Context.Properties.PropertyAsStrings["MyGridStrings"];
MyGridStrings will then contain a list of name=value pairs from the grid.