[flexcoders] checkbox cell renderer

2006-01-22 Thread Husain Kitabi



Hi  I have a datagrid with a checkbox renderer. I want to know if checkbox in each row is checked or not.  My datagrid is asmx:DataGrid id="classgroupOfModule" dataProvider="{moduleClassgroupList.currentItem.classgroups}" width="100%"mx:columnsmx:Arraymx:DataGridColumn headerText="Select" columnName="studentSelection"   cellRenderer="com.lsmonline.client.view.util.CheckBoxCellRenderer"/mx:DataGridColumn headerText="Name" columnName="classgroupName" /mx:DataGridColumn headerText="Capacity" columnName="classgroupCapacity"
 /mx:DataGridColumn headerText="Current Enrol" columnName="currentEnrolments" //mx:Array/mx:columns/mx:DataGridShould i use mx.controls.Checkbox as my renderer or should i customise it. In my customised renderer i do nothing really. My requirement is to get the selected rows which the user has checked.Please advise.  ThanksHusain   
		  
What are the most popular cars?  Find out at Yahoo! Autos






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] Checkbox Cell Renderer

2005-09-12 Thread Mehdi, Agha
Title: Checkbox Cell Renderer










Matt, Code is below. Can you please take
a look at it and let me know what I am doing wrong?



import mx.core.UIComponent

import mx.controls.CheckBox



class
com.idt.pcmssearch.parametric.renderers.CheckCellRenderer extends UIComponent

{



 var check : MovieClip;

 var listOwner : MovieClip;

 var getCellIndex : Function;

 var getDataLabel : Function;



 function CheckCellRenderer()

 {

 }



 function createChildren() :
Void

 {

 check =
createClassObject(CheckBox, check, 1, {styleName:this,
owner:this});

 check.addEventListener(click,
this);

 size();

 }



 function size() : Void

 {

 check.setSize(20,
layoutHeight); 

 check._x =
(layoutWidth-20)/2;

 check._y =
(layoutHeight-16)/2;

 }

 

 function setValue(str :
String, currentItem : Object, sel : Boolean) : Void

 {

 //check._visible
= (currentItem!=undefined);

 check.selected =
currentItem[getDataLabel()];

 }

 

 function getPreferredHeight()
: Number

 {

 return 16;

 }

 

 function getPreferredWidth()
: Number

 {

 return 20;

 }

 

 function click()

 {

 listOwner.editField(
getCellIndex().itemIndex, getDataLabel(), check.selected );

 }

 

}



Thanks



Agha Mehdi 
IDT - eBusiness Program Manager 











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Saturday, September 10, 2005
9:16 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Checkbox
Cell Renderer





Im guessing that you accidentally
have a reference to something that is not being cleared in your renderer.
Remember that the renderer is re-used for many items and as you scroll up and
down it changes position. So maybe theres an instance variable in your
renderer thats accidentally staying set, i.e., youre not clearing
everything that you need to in your setValue method.



Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mehdi, Agha
Sent: Friday, September 09, 2005
5:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Checkbox
Cell Renderer





Hi all,

I have a weirdo thing going on with this
renderer. When I check the
checkbox in the grid, it automatically selects other checkboxes in the same
grid randomly. The most interesting part is that when I scroll through the
grid, it keeps checking/unchecking the boxes without any reason. Also, when I
have some rows checked and I get new data in the grid, it keeps the boxes
checked at previous indexes.

Anyone ever ran into this issue?

Thanks

Agha Mehdi

IDT - eBusiness Program Manager

Work: 408.284.8239

Fax: 408.284.2766










--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Software design and development
  
  
Macromedia flex
  
  


Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











RE: [flexcoders] Checkbox Cell Renderer

2005-09-10 Thread Matt Chotin
Title: Checkbox Cell Renderer










Im guessing that you accidentally
have a reference to something that is not being cleared in your renderer.
Remember that the renderer is re-used for many items and as you scroll up and
down it changes position. So maybe theres an instance variable in your
renderer thats accidentally staying set, i.e., youre not clearing
everything that you need to in your setValue method.



Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mehdi, Agha
Sent: Friday, September 09, 2005
5:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Checkbox
Cell Renderer





Hi all,

I have a weirdo thing going on with this
renderer. When I check the
checkbox in the grid, it automatically selects other checkboxes in the same
grid randomly. The most interesting part is that when I scroll through the
grid, it keeps checking/unchecking the boxes without any reason. Also, when I
have some rows checked and I get new data in the grid, it keeps the boxes
checked at previous indexes.

Anyone ever ran into this issue?

Thanks

Agha Mehdi

IDT - eBusiness Program Manager

Work: 408.284.8239

Fax: 408.284.2766









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Software design and development
  
  
Macromedia flex
  
  


Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











[flexcoders] Checkbox Cell Renderer

2005-09-09 Thread Mehdi, Agha
Title: Checkbox Cell Renderer







Hi all,

I have a weirdo thing going on with this renderer. When I check the checkbox in the grid, it automatically selects other checkboxes in the same grid randomly. The most interesting part is that when I scroll through the grid, it keeps checking/unchecking the boxes without any reason. Also, when I have some rows checked and I get new data in the grid, it keeps the boxes checked at previous indexes.

Anyone ever ran into this issue?

Thanks

Agha Mehdi

IDT - eBusiness Program Manager

Work: 408.284.8239

Fax: 408.284.2766









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Software design and development
  
  
Macromedia flex
  
  


Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.