Reputation: 79
I'm wondering if it's possible to dynamically change the interactive grid region header text. I have an IG that provides detail from a "master" report, and I'd like the HTML header text to update dynamically to display the title of the master record being displayed.
I'm guessing I'll need to create a custom dynamic action, but I'm not sure how to identify / reference the region header text element.
I appreciate any ideas.
Upvotes: 1
Views: 2601
Reputation: 4659
I created a Master/Detail page based on DEPT/EMP to come up with these steps.
js-ig-emps
). Here's the code I used:
var selectedRecord = this.data.selectedRecords[0];
var selectedDept = this.data.model.getValue(selectedRecord, 'DNAME');
var newText = 'Employees in ' + selectedDept;
$('#js-ig-emps .t-Region-title').text(newText);
That assumes you're using Universal Theme. You'll need to make adjustments according to your requirements and the columns you have access to from the parent region.
Upvotes: 2