cancel
Showing results for 
Search instead for 
Did you mean: 

How do I fix the Table Column Header?

Former Member
0 Kudos

Hi all,

I have a requirement. I need to fix the Table Column Header in a particular position such that it can be seen on the screen always. i.e The Header should be visible even when the user scrolls down to the bottom of the page. Hence, I created a new container for the headers and put seperate TextViews for the column headers.

But, I am not able to do the alignment properly by adjusting the width of indivisual elements.

How can I achieve proper alignment. Or, is there any other way to fix the Table Column Header such that it is visible always?

Any help will be appreciated!

Regards

Kishan

Edited by: kishan chandranna on Mar 16, 2009 7:32 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kishan,

If you are not using version CE then it's bit tedious job.

There is no way to set the header of table.

Although you can attain it.

First you need to create 2 table.

Table 1: Holds the Labels/Headers

Table 2: data

Hide data fields of each cell in table 1 and Header fields of each cell in table 2.

Now, fix the length of each cells in both the table. This will fix your each column.

Adjust width and other properties of each cell as required.

You have to deploy and check the alignment. This process may take few hrs.

This is the only way to set the header.

Alternatively:

You can also provide tool tips to text fields. But tool tip option is only available with text box.

Regards,

Abhijeet

Former Member
0 Kudos

Hi Abhijeet,

Thanks for the suggestion. If I go according to your first suggestion, won't it hinder the performance of my application. Suppose the table has 300 odd rows, it will have to load it twice and hence the performance will be lowered considerably.

Regards

Kishan

pravesh_verma
Active Contributor
0 Kudos

Hi Kishan,

If following the steps which Abhijeet has suggested solves you issue of alignment then I guess you problem is solved.

1) Just create 2 table as he suggested.

2) Create a dummy node structure as that of actuall node structure.

3) Bind the table in first contianer with this dummy node.

and rest will be the same.

This table which is binded with the dummy node will never get populated as there is not logic written for it. Therefore there will be no performance hit even if the number of records in actual table is large.

However follow this only if your alignment issue is resolved.

I hope this helps!

Thanks and Regards

Pravesh

Former Member
0 Kudos

Hi Krishna,

Yes, it will take some time but any ways data node is loaded when bapi is executed.

I hope you are not manipulating the table entries and it's display only.

As, there is no other way to set the table header.

We had the same requirement and we had dropdowns, inputbox, checkbox with manipulations.

Loading time was there.

Alternatively:

As, suggested you can link source of first table to dummy node.

And label to description of your table.

Regards,

Abhijeet

Answers (1)

Answers (1)

pravesh_verma
Active Contributor
0 Kudos

Hi Kishan,

Which version of Netweaver you are using. In CE version you have table with scroll bar. Where you need not have to do anything. The table header is automatically displayed even if you scroll down the table content.

However if you do not have this version then I dont think there is any other way apart from which you were trying.

NOTE: One word of advice. Always set the width of the text view in % value instead of pixel. This will allow you to handle the table header width synamically with the minimise and maximise of the internet browser window.

Also you can do one thing.

1) Put the table in another transparent container and header in different container.

2) Set the same width for both container in %. Lets say 90%.

3) Since you already know the number of ciolumns of table. Divide the 90% with that many number of columns (For e.g: If you have threee columns then 90/3 = 30%).

4) Set the width of each text view in above transparent container as 30% each so that it can be aligned with the columns of the table.

I hope this will solve your issue. If you require any other input then please let me know.

Thanks and Regards,

Pravesh

Former Member
0 Kudos

Hi Pravesh,

Thanks for the suggestion.

I am using NetWeaver 7.0. I tried doing things as you said, but still the alignment is not proper.

The length of the table content overrides the value I give. Is there any other way?

Regards

Kishan

pravesh_verma
Active Contributor
0 Kudos

Hi Kishan,

Fix the column width to same % to which you have set the textView width. I hope this solves the issue. I guess this is the only workaround, otherwise you dont have any otehr way to achive it. There will definitely be some minute differnces in the textview container and column container, but I guess for such kind of requirement you have to live with that.

Please note that in the second conatiner which contains the Table. Set the Container width to let say 90% and Table width to 100%. Set column width to (90/number of columns )%.

Also please note that, in netweaver 7.0 you dont have table scroller available.

I hope this works. Kindly revert back if you need any further help!

Thanks and Regards

Pravesh