SOLVED
I have a Flex/PHP app I’m working on.
I have a single ArrayCollection for a data source, but have 8 datagrids (named dg1 through dg8). I use 8 datagrids for logical presentation (4 years of college, 2 semesters per year). I have a column with “X” (for “delete this record”) that goes to a function when clicked.
What I’d like to do is pass the datagrid id (such as “dg1”) and the data provider {syllabus.freshFall} to a function. I’ve been trying my hardest to find how I do this, but have only found examples of single datagrids (which look pretty easy) and referring to a single fixed datagrid like this:
course_id=dg1.selectedItem.course_ID;
syllabus.freshFall.removeItemAt(dg1.selectedIndex);
I want to make this something like this:
course_id=**whateverDataGrid**.selectedItem.course_ID;
**whateverDataProvider**.removeItemAt(**whateverDataGrid**.selectedIndex);
NOW I need help passing my c_id variable to my HTTPService.
Thanks for ALL your help!
PARTIAL ANSWER:
with help from Adobe LiveDocs for Flex 3
I would still like to make the data provider more of a variable, just to be complete. I tried several different approaches and the case statements were the closest to what I wanted and it worked for now.
Figured out passing my c_id variable from my function to my HTTPService. Not exactly as straight-forward as I would have hoped…
Build a variable in the type of Object
Add an element to the object of the name of your variable you want to pass
Add a value for the variable.
Pass the
It looks like this:
Hope this helps someone else. It’s been a bit of a pain to piece this all together.