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 |
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. |
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, |
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.
If you change dataSource name to "emsDashboardProjects1", your procedure will not throw an exception. Best Regards Serdar Gokcen |