This content has been marked as final. Show 5 replies
You can't put a DataGrid inside a list component. Or rather, I wouldn't try to do that.
Believe it or not, a DataGrid is actually an enhanced version of List component, and based on what you describe is probably what you want to use instead of a List component. You could have a column for quantity and have the values default to zero. That column can have editable cells that the user could change when it was selected.
Here's a quick example.
Drag a DataGrid component onto the stage and give it the name:
then use this code in the same frame on new layer
Hi GWD and thanks for responding.
I fully understood your explanations and the example you provided.
I'll give it a try, for sure.
But I want to know:
- How do I populate a DataGrid Component? Like a List Component? (you said they are quite the same, I assume methods to apply are identical...)
-In the same way, I can pull out the data from a DataGrid as I do for the List, right?
You can basically populate it like the example above. They key difference is that you don't have specific label and data properties for your 'items'.
The other way is to set up an array of objects as a dataprovider. If someone else hasn't provided you an example I'll make one later on and post it. Its not much different to that except you don't use 'addItem' etc
Will you be there tomorrow?
I must leave home by now.
I give a try to this formula this evening and by tomorrow give you my feedback with explanations about the purpose of the DG.
Thank you very much for your help.