Repository navigation
Version 1.22.1
Added a way to hide filtering and status controls on DynamicTable, in case you want a simpler table control. Usage from Ruby looks something like below. Note the methods setShowFilterControls and setShowStatusLabel.
dynamic_table_tab = dialog.addTab("dynamic_table_tab","Dynamic Table")
# Define the headers
headers = [
"Name", "Color", "Age"
]
# Define some data to display
values = [
{:name => "Ziggy", :color => "Grey", :age => 10},
{:name => "Ringo", :color => "Grey", :age => 10},
{:name => "Scrappy", :color => "Black", :age => 5},
{:name => "Dolly", :color => "Black", :age => 1},
]
dynamic_table_tab = dialog.addTab("dynamic_table_tab","Dynamic Table (Hide Some)")
# Need to supply a callback which can fetch field values from a given record in the data
# and potential save values back assuming you wish the table to be editable
dynamic_table_tab.appendDynamicTable("dynamic_table","Dynamic Table",headers,values) do |record,column|
case column
when 0
next record[:name]
when 1
next record[:color]
when 2
next record[:age].to_s
else
next "Unknown"
end
end
dynamic_table = dialog.getControl("dynamic_table")
# Hide both filter controls and status label for table-only view
dynamic_table.setShowFilterControls(false)
dynamic_table.setShowStatusLabel(false)