Hi all,

I am issuing an api_component.getvaluetx to get the value of a grid component. But it does not bring anything. However, if I issue the command api_datasource.getcolumnvaluetx the value is fetched. But the grid I want to work with is a single row non-datasource grid. How can fetch the grid column values?

George.

asked 07 Apr '13, 07:10

George's gravatar image

George
1111232
accept rate: 0%


Hi George, You can create a dummy query based datasource and bind it to the grid. This way you can use all the datasource API's when working your grid.

Yalim

link

answered 07 Apr '13, 08:04

Yalim's gravatar image

Yalim ♦♦
2.8k5
accept rate: 21%

Hi Yalim,

I did as you suggested. Now unfortunately the row is not visible at all. Without the datasource I had yellow highlighted row visible. Now nothing. I tried the following commands on postinitialization. But no luck. Kindly suggest the appropriate action:

  B.T.N1     := api_datasource.createrow('G_LOV_CTRL');
  api_datasource.firstrow('G_LOV_CTRL');
  --request focus does not work;
  api_component.requestfocus('G_LOV_CTRL_GRID.LOV1');

Regards.

George.

(07 Apr '13, 09:30) George

Are you just creating an empty row with no values in the columns? Put some default values to the new row you are creating to see something in the grid.

What is G_LOV_CTRL_GRID? Is it a panel or a grid? If it is a grid, this syntax is not correct. You must reference components using the [panelName].[componentName] notation. If it is a Panel, your naming convention is a little confusing. :-)

Best, Yalim

(07 Apr '13, 10:46) Yalim K. Gerger ♦♦

Hi Yalim,

All my grid panel names end with _GRID and I give the same name as panel name for the grid itself. And my data source for the grid is same as the panel name but without the _GRID ending. Therefore, if my panel name is TABLEXY_GRID, the grid name will also be the same name TABLEXY_GRID and the datasource will be TABLEXY. This naming convention is used to avoid all confusion. If it is not the best practice kindly advice.

continued...

(07 Apr '13, 11:59) George

I tried both the following test code to set a default value. But no error is returned nor does it show the blank row. If I am making a mistake somewhere kindly correct me and send me a piece of code.

  api_component.setvalue('G_LOV_CTRL_GRID.LOV1','aa');
  api_datasource.setcolumnvalue('G_LOV_CTRL.LOV1','aa');

I am trying to make a custom lov screen with two panels. The top panel has an empty row and the bottom panel will show the lov query result as the user types on the top row columns.

Your help is greatly appreciated.

George.

(07 Apr '13, 12:07) George

Hi George,

Are you binding the LOV1 column to a component existing in your grid? In order to display datasource rows in a grid, you should bind at least one datasource column to a component existing in this grid:

<grid dataSource="G_LOV_CTRL">
  <column headerLabel="LOV1">
    <textField column="LOV1"/>
  </column>
</grid>

Hope this helps,
Ibrahim

(08 Apr '13, 03:49) Ibrahim Sand... ♦♦

Hi Ibrahim,

I have solved this problem by created a new table for the datasource and then also by recreating the whole panel from a similar one.

Now it is working as expected.

Regards.

George

(08 Apr '13, 14:53) George
showing 5 of 6 show 1 more comments
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
×1
×1

Asked: 07 Apr '13, 07:10

Seen: 1,002 times

Last updated: 08 Apr '13, 14:53


© Copyright Gerger 2017