Dear sir,

We have requirement to set column header dynamically, base on the project started. For example, if the project start on FEB 14, then the first column of the grid should be FEB 14.

I have tried the following, but nothing happen:

v_period_start_tx := api_component.getvalueTx('emsProject_Header.PilotStart'); api_component.setgridheaderlabel('emsProject_GridSaving.projectSaving','month1',v_period_start_tx);

Any help would be appreciated.

Thanks Suputra

asked 15 Mar '15, 20:33

suputra's gravatar image

suputra
115
accept rate: 0%


Dear Formspider Team,

Following up my previous problem/question, the program trap column name error when I add api_exception.e_invalidColumnName, eventhough I've already copied the column name from my xml panel. I manage to get datasource name using api_component.getdatasource.

I did not manage to get column name using api_component.getclickedgridcolumnname.

The question is, do we allowed to manipulate grid column name using the provided API? If the answer is YES, how should we do it?

Thanks for your support.

link

answered 22 Mar '15, 06:19

suputra's gravatar image

suputra
115
accept rate: 0%

Hi Supultura,

The code example you provided in your question works for me. I suspect the problem might be related to the data type of the component you are reading from. Please make sure you are reading with the correct getValue function. For example, if the data type of the component is number please ensure that you are using api_component.getValueNR.

Other than that I was able change the header label with the two lines of code you used.

If you cannot solve your issue, please prepare a small sample application that represents the problem and email it to us at contact@theformspider.com

Kind Regards,
Yalim

link

answered 23 Mar '15, 11:21

Yalim's gravatar image

Yalim ♦♦
2.8k5
accept rate: 20%

Dear Formspider Team,

I am so sorry I still could not solve the problem. I've just sent you the code.

Thanks Suputra

link

answered 24 Mar '15, 19:14

suputra's gravatar image

suputra
115
accept rate: 0%

Dear Yalim / Formspider Team,

Can I get the solution for my problem already?

Thanks. Suputra

link

answered 01 Apr '15, 06:21

suputra's gravatar image

suputra
115
accept rate: 0%

Dear Yalim and Formspider team,

Hopefully you have already time to review sample program that I've sent. Could you find what am I doing wrong? Could you please advice me how to fix it?

Regards.

link

answered 14 Apr '15, 20:21

suputra's gravatar image

suputra
115
accept rate: 0%

Hi Suputra,

The statement which throws the exception is not "setgridheaderlabel" API. The following line of your code uses the incorrect dataSource name and that's why you are getting an invalid column name exception.

v_monitor_period_NR := api_datasource.getcolumnvaluenr('emsProjectGridSaving1.monitor_duration');

If you change dataSource name to "emsDashboardProjects1", your procedure will not throw an exception.

Best Regards Serdar Gokcen

link

answered 15 Apr '15, 07:02

Serdar's gravatar image

Serdar ♦♦
100k4
accept rate: 13%

Hi Serdar,

Thanks a lot for your help, its work.

Best Regrards.

link

answered 15 Apr '15, 09:45

suputra's gravatar image

suputra
115
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×85
×16
×8

Asked: 15 Mar '15, 20:33

Seen: 1,656 times

Last updated: 15 Apr '15, 09:45


© Copyright Gerger 2017