cancel
Showing results for 
Search instead for 
Did you mean: 

Lost previously entered values in Tablegrid onValueChange?

Former Member
0 Kudos

Hello,

The situation:

I have in my Grid a column "Quantity", which is bind to BOITEMCONTAINER.Quantity. The field BOITEMCONTAINER.Quantity is Unlike other properties of BOITEMCONTAINER, not bind to any BDoc fields.

I store the value in the BO, but it is not automatically displayed on the tablegrid on screen even if the Event "OnValueChange" shows me the user input is stored in the BO. I have used RowLoaded2 to manually assign the BO values Quantity to the tablegrid. I am not sure if this is supposed to work this way.

My problem is, that I enter values in different rows and somehow all previous entered values are getting lost.

I am entering values such as

Row 1 -> Quantity = 1 & click on Row 2

=> Event onValueChange ( boundedAttributeChange = true ) { current Position = 1; value of BO = 1; value of field in grid = "1" }

=> Event onValueChange ( boundedAttributeChange = false ) { current Position = 2; value of field = Nothing; value of field in grid = "" }

Row 2 -> Quantity = 2 & click on Row 3

=> Event onValueChange ( boundedAttributeChange = true ) { current Position = 2; value of BO = 2; value of field in grid = "2" }

=> Event onValueChange ( boundedAttributeChange = false ) { current Position = 3; value of field = Nothing; value of field in grid = "" }

click on Row 2

=> Event onValueChange ( boundedAttributeChange = false ) { current Position = 2; value of BO = Nothing; value of field in grid = 2 }

click on Row 1

=> Event onValueChange ( boundedAttributeChange = false ) { current Position = 1; value of BO = Nothing; value of field in grid = 1 }

I always access the BusinessCollection thru the anchor reference, but the BO behind gets resetted or replaced somehow.

If I assign the BO-Quantity Property to an BDoc Segment-Field, I do not get the troubles. But I actualy want to avoid this way!

Does anyone know why the BO property is not automatically mapped to the field and how I can store the values in the BO successful?

Regards,

Andreas

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

I think you can bind with business collection in the RowLoaded2() function.

columns.Item(ctrlname.bookmark)=bcol.geattribute(k,"attribname")

When you enter the values it stores in the business collection and retrieve using the above way.

Thanks and Regards,

Praveen

Former Member
0 Kudos

Hi,

you could compare your design with list tile <CPB_FastOrderEntItemGrid>. Or is this exactly what you are working on?

Regards,

Wolfhard

Former Member
0 Kudos

Hi,

yes, I am working on that Tile!

I need to change the behaviour if someone enters the quantity value. The current logic adds automatically the items to the sales document as soon as someone is going to set the value & pressed "Enter" or by setting the focus to another field. The value is always resetted to "".

I want to keep the value and trigger on Button click a logic to add all items with set quantity to the item list of the sales order.

I already tried to read directly the values from the tablegrid without using the acnhor, but the method "getParticularRowContent(index)" does not return any Scripting.Dictionary object except for the last modified row.

Regards,

Andreas