Hello Community,
I currently have a Main.fla file with several products for the user to select with the check out button that displays the item, price & quantity into a Flash Datagrid. This works fine however, I need help to display the items in the order the user selected them currently the way I have the code set up it only displays the items as how I first stored them into the array and pushed them into the datagrid.
Code://Create a dataProvider to add some data to the Datagrid data_array = new Array(); data_array.push(myArr, myArr2, myArr3); cart.dataProvider = data_array;
For ex: If I only chose one item to buy that one item should not be in the middle of the datagrid but at the top since it is the only item.
The second issue is I am trying to delete an item if the user selects it by prompting the user a Pop Up Message however this is not working either.
Any help is greatly appreciated thanks in advance! See attached for complete fileCode:// Create listener object for DataGrid to remove selected item. var listenerObject = new Object(); listenerObject.cellPress = function(eventObject:Object){ _root.MessageBox("Warning","Are you sure you want to delete this item."); if (eventObject == Alert.YES) { trace("Remove Item"); cart.removeItemAt(cart.target.selectedIndex) //cart.dataProvider.removeItemAt(cart.selectedIndex) } else if (eventObject == Alert.NO) { trace("No Label"); } } cart.addEventListener("cellPress", listenerObject) }


Reply With Quote

Bookmarks