PDA

View Full Version : How to access a row in datagrid


mike k
02-24-2006, 09:36 AM
Hi,
I need to access a row in a datagrid and change the color. If anybody know plz help me.

Thanx in advance.

mayur_vnit
02-24-2006, 10:35 AM
try this


my_list.columnNames = ["UserName", "EployeeID"];
my_list.dataProvider = [{UserName:"Chris", EployeeID:"01"}, {UserName:"Chris", EployeeID:"01"}, {UserName:"Chris", EployeeID:"01"}, {UserName:"Chris", EployeeID:"01"}];
my_list.setPropertiesAt(2, {backgroundColor:0xFF0000});




where my_list is the instance name of the datagrid on the stage

mike k
02-24-2006, 10:59 AM
Thanx Mayur. Similarly can u explain me how to get the properties. I tried getItemAt(). Itz not working. Plz help.

mayur_vnit
02-24-2006, 11:03 AM
trace(my_list.dataProvider.getItemAt(1).UserName)