Use an event listener instead of an on(click) event handler:

var columnCheckListener:Object = new Object();
columnCheckListener.click = function(eventObject:Object)
{
trace("Change in checkbox '" + eventObject.target._name + "' to " + eventObject.target.selected);
};

// Register each check box to the event listener
check1.addEventListener("click", columnCheckListener);
check2.addEventListener("click", columnCheckListener);

Adapted from the help files, at Components Language Reference -> CheckBox component -> CheckBox.click

Nathan
http://www.nathanderksen.com


On Feb 9, 2006, at 3:49 AM, Srishti Bhatia wrote:

thanks for the help provided.
Actually,can anyone tell me how to know that which are
the checkboxes labelled with the column names which the user
has selected in the pop-up window?
i mean which checkboxes have been ticked?
Should the event handler(click) be on the checkbox ?

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Nathan
Derksen
Sent: Wednesday, February 08, 2006 9:43 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] hiding datagrid columns?


Use removeColumnAt() and addColumn()/addColumnAt()

var dataArray:Array = new Array();
dataArray.push({foo:"1", bar:"2", baz:"3"});
dataArray.push({foo:"1", bar:"2", baz:"3"});
dataArray.push({foo:"1", bar:"2", baz:"3"});
dataArray.push({foo:"1", bar:"2", baz:"3"});
dataArray.push({foo:"1", bar:"2", baz:"3"});
dataArray.push({foo:"1", bar:"2", baz:"3"});
dataArray.push({foo:"1", bar:"2", baz:"3"});
dataArray.push({foo:"1", bar:"2", baz:"3"});
dataArray.push({foo:"1", bar:"2", baz:"3"});

myDG.dataProvider = dataArray;

myDG.removeColumnAt(2);
// Later call the following to get the column back:
myDG.addColumnAt(2, "baz");

Note that the third column of data is not removed from the data
provider when you call removeColumnAt(2), it just removes the visual
representation of the data.

Nathan
http://www.nathanderksen.com


On Feb 8, 2006, at 1:47 AM, <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]> wrote:

Does anyone know a way to hide a datagrid column.
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of
the addressee(s)and may contain confidential or privileged
information. If you are not the intended recipient, please notify
the sender or [EMAIL PROTECTED]
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s)and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender or [EMAIL PROTECTED]
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to