PDA

View Full Version : Row in a datagrid must be selected


fohanlon
03-10-2008, 12:26 AM
Hi Guys

I am new to datagrid component.

I want to have actionscript to do the following:

if(a row has not been selected in a datagrid called scores)
mx.controls.Alert.show("Please select a row first");
else
getURL("some url", _self", "GET");

Its the code to check if a row has been selected that I cannot seem to get working. I had if(scores.selectedItem) but this never when into the else.

Any help greatly appreciated.

Many thanks,

fergal.

fohanlon
03-11-2008, 11:17 AM
Heres how I solved it:

if(_root.my_dg.selectedItem)
getURL("some url=", "_self", "GET");
else
mx.controls.Alert.show("Please select ...");