on 02-08-2007 10:51 AM
Dear friend,
How we can dynamically put a text in line heading in a table control?
this is very urgent, pl'z help.
Vikrant Shukla
Hi,
You mean in the tableView ?
<htmlb:tableView id = "tvx"
headerText = "<%= sy-uzeit %>"
headerVisible = "true"
...
/>
Best regards,
Guillaume
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When you say <i>on run time</i>, do you mean <u>without any server round-trip</u>?
If this is the case (personnally, I call this <i>on the client-side</i>), I would suggest thinks like :
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
<htmlb:document>
<htmlb:documentHead title="Javascript ot the rescue!">
<htmlb:headInclude/>
<script type="text/javascript">
function changeTitle (idTable, newTitle) {
var trgtTable = document.getElementById(idTable);
var thTag = trgtTable.firstChild.firstChild.firstChild;
thTag.innerHTML = newTitle;
}
</script>
</htmlb:documentHead>
<htmlb:documentBody>
<htmlb:form>
<% DATA: wt_sflights TYPE TABLE OF sflights.
SELECT * FROM sflights UP TO 20 ROWS INTO TABLE wt_sflights. %>
<htmlb:button text="Change title"
onClientClick="changeTitle('tvx','My own will');" />
<htmlb:tableView id = "tvx"
headerText = "Flights"
headerVisible = "true"
table = "<%= wt_sflights %>" />
</htmlb:form>
</htmlb:documentBody>
</htmlb:document>
</htmlb:content>
Now, you just have to set the Javascript function changeTitle to the event of your choice !
Best regards,
Guillaume
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.