cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Dynamically change Add Row Property Programmaticly

smayer
11-Garnet

Dynamically change Add Row Property Programmaticly

Hi

 

Does anyone know how to change the AddRow property dynamically? (circled below)  is this possible or are there alternatives?

 

 Capture.JPG

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
smayer
11-Garnet
(To:supandey)

Thanks for that @supandey! As I was trying to implement your answer I found another solution that worked for me, this seemed to be simple enough. 

 

Capture.JPG

View solution in original post

4 REPLIES 4
supandey
19-Tanzanite
(To:smayer)

Hi @smayer since the row object is adding value to the infotable which depends on the underlying DataShape. My understanding is that you could test by calling the DataShape.AddFieldDefinition() or DataShape.UpdateFieldDefinition or DataShape.RemoveFieldDefinition prior to calling AddRow() to basically edit the underlying DataShape and this should give you the required property to work with when AddRow() is called on the InfoTable.

 

Feel free to correct me if i didn't get your use case right.

smayer
11-Garnet
(To:supandey)

Thanks for that @supandey! As I was trying to implement your answer I found another solution that worked for me, this seemed to be simple enough. 

 

Capture.JPG

supandey
19-Tanzanite
(To:smayer)

Thanks for sharing, that also sound good. However, if i understand it right the value insert in that will only work if the dataType is the same?
smayer
11-Garnet
(To:supandey)

Yes, you are right, that would be its limitation. However, for my use case, I will always be expecting a number data type.

Top Tags