Adding CheckBox in AdvancedDataGrid Tree

788 προβολές
Παράβλεψη και μετάβαση στο πρώτο μη αναγνωσμένο μήνυμα

Ravi

μη αναγνωσμένη,
9 Ιουλ 2008, 4:38:32 π.μ.9/7/08
ως Flex India Community
Hi All,

This there any way to add checkbox in the advancedDataGrid tree
control (checkbox only for leat node).
Please help me out in this regard.

Thanks in Advance,
Ravi Thangavel

Sameer

μη αναγνωσμένη,
9 Ιουλ 2008, 6:41:30 π.μ.9/7/08
ως Flex India Community
You can set the itemRenderer on the column for which you want
checkbox.

For a different approach, have a look at -
http://techrays.wordpress.com/2008/02/18/a-3-state-checkbox-in-an-advanceddatagrid-itemrenderer/

-Sameer

vinitha pascal

μη αναγνωσμένη,
9 Ιουλ 2008, 7:11:34 π.μ.9/7/08
ως flex_...@googlegroups.com
Hi Sameer,
 
The link which is given by you is excellent. Can i get the similar functionality done in a different way. I mean i want the "Select All" checkbox in the header. Please send me the sample code for achieving this.
 
Thanks in advance.
Vinitha

 

Venkat Viswanathan

μη αναγνωσμένη,
9 Ιουλ 2008, 2:29:32 μ.μ.9/7/08
ως flex_...@googlegroups.com
Hi Vinitha,

Here it is:

http://www.thegoldhold.com/?p=4

Five minutes of Googling helps! :)

Regards,
Venkat

vinitha pascal

μη αναγνωσμένη,
10 Ιουλ 2008, 2:04:41 π.μ.10/7/08
ως flex_...@googlegroups.com
Thanks alot Venkat :) . I googled but couldnt find..
 
Small question regarding "How to access the control placed in the datagrid column?" The way i am adding the control is given below
 

<mx:AdvancedDataGridColumn

id="RemoveIconColumn" width="20" dataField="ActivityAssignmentDate">

<mx:itemRenderer>

<mx:Component>

<mx:HBox width="280" height="32" paddingLeft="10" paddingTop="2" verticalAlign="middle" visible="false">

<mx:Image id="RemoveIcon" source="images/Dashboard/tooltip-close.gif" click="this.parentDocument.cancelRegistration(data);" visible="false" />

</mx:HBox>

</mx:Component>

</mx:itemRenderer>

</mx:AdvancedDataGridColumn>
My requirement is to show/hide the image in itemRollOver. I am unable to access image control in the itemRollOver event. Please help me in solving this.
 
Thanks in advance.

 

Prakasam

μη αναγνωσμένη,
11 Ιουλ 2008, 2:27:33 π.μ.11/7/08
ως Flex India Community
Hi All,

The link which you gave by Sameer is really good.In that GroupRenderer
is used to add checkboxes which displays for all the nodes. But our
requirement is to add checkbox only for leaf nodes. Based on this
example i have tried alot but couldn't find solution. The point in
GroupRenderer class is, when the createChildren method is triggered
the data object is null. so they is no possible way to find whether it
is parent node or leaf node. If you have idea based on our requirement
please share it.

Thanks and Regards,
Prakasam

vinitha pascal

μη αναγνωσμένη,
16 Ιουλ 2008, 2:05:46 π.μ.16/7/08
ως flex_...@googlegroups.com
Thanks Venkat. The link was very useful. But my requirement is to expose "click" event and "selected" property for the checkbox's to the outside world. I wrote a custom event to expose a click event on datagrid's itemClick event. But how can i expose the selected property passing the row data with it?
 
Any help?

Venkat Viswanathan

μη αναγνωσμένη,
16 Ιουλ 2008, 1:57:02 μ.μ.16/7/08
ως flex_...@googlegroups.com
Hi Vinitha,

You can find the row index of the itemRenderer by writing the following code in the creationComplete event of the itemRenderer:

var col:DataGridListData  = DataGridListData(listData);
rowIndex = col.rowIndex;

Store rowIndex as a private variable in the itemRenderer itself and use it while dispatching the event. For checking if the checkbox is selected or not, in the "click" event of the CheckBox, you will get event.target.selected. Use this property along with rowIndex.

Hope this solves your queries.

Regards,
Venkat

Nitin Vaghela

μη αναγνωσμένη,
17 Ιουλ 2008, 2:43:29 π.μ.17/7/08
ως flex_...@googlegroups.com
hi,
 
For this problem,  i think this attachment may be help to you.
 
 
CheckBoxListAndDataGrid.zip
Απάντηση σε όλους
Απάντηση στον συντάκτη
Προώθηση
0 νέα μηνύματα