0

In FinalBuilder Action Studio -StandardGrid(Component Palette)

1.How to change the column name (Key, Value)?

2.How to Add Key Value?

3.How to retrieve the values in (key,value) in visual studio?

I tried all options and Is there any other way so as to add data in tabular fashion in Action studio.

But I feel it is possible because Send Email Action in final builder supports data grid. But I don't know how.

Jason
  • 840
  • 11
  • 23

1 Answers1

0

The answers in order are:

  1. If the grid is called "GridExludeItems" then in the ReadData script for the property page add the following;

    Page.GridExcludeItems.TitleCaptions.Strings(0) = "Exclude Type" Page.GridExcludeItems.TitleCaptions.Strings(1) = "Exclude Value"

  2. To append a row (adding a key and value at the same time) use the following;

    Page.GridExcludeItems.InsertRow(excludedType, excludedValue, true);

  3. 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.

Jason
  • 840
  • 11
  • 23