Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » Update Table Header Text after Smart field value Change
Update Table Header Text after Smart field value Change [message #1820943] Sun, 02 February 2020 16:07 Go to next message
Eclipse UserFriend
Hello All,
I need to change the table header text based on a value change of a smart field.
How can I access the header texts and update the UI after the change event.
Thanks
Re: Update Table Header Text after Smart field value Change [message #1820950 is a reply to message #1820943] Mon, 03 February 2020 03:23 Go to previous messageGo to next message
Eclipse UserFriend
For some reason this is quite complicated, but this will work:

Table table = getTableField().getTable();
NameColumn column = table.getNameColumn();
((HeaderCell) column.getHeaderCell()).setText("Text from SmartField");
TableEvent event = new TableEvent(table, TableEvent.TYPE_COLUMN_HEADERS_UPDATED);
event.setColumns(table.getColumns());
table.fireTableEventInternal(event);


By sending the event COLUMN_HEADERS_UPDATED the UI will re-render the table-header (and only the table-header).

Cheers,
André

Re: Update Table Header Text after Smart field value Change [message #1820980 is a reply to message #1820950] Mon, 03 February 2020 14:31 Go to previous message
Eclipse UserFriend
That is perfect, thanks
:)

[Updated on: Mon, 03 February 2020 14:32] by Moderator

Previous Topic:Uploading all files in a directory tree in Scout 9
Next Topic:Aggregating columns in a table according to a different algorithm than the one built-in
Goto Forum:
  


Current Time: Fri Aug 29 18:22:55 EDT 2025

Powered by FUDForum. Page generated in 0.06458 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top