I have a datagrid with two columns. when an item is selected
on this datagrid, another datagrid gets populated based on the
selected item. But as things stand, the second dgrid is inside a
repeater. This dgrid has a custom checkbox as an itemrenderer. When
a checkbox is checked a chart is to be populated based on this
data.

The problem now is: The view gets updated only after an extra
click event after checking a checkbox.

Is there any way to update the view as soon as the checkbox
is checked ?

Thanks

<mx:TabNavigator id=”svc1″ x=”35.5″ y=”200″ width=”930.5″
height=”414″>

<mx:Repeater id= “r” dataProvider=”{servicelist}” >

<mx:Canvas id=”nameLabel”

label=”{r.currentItem.service_name}”

width=”928″ height=”302″>

<mx:DataGrid id=”tk” x=”1″ y=”0″ width=”270″ height=”302″
dataProvider=”{r.currentItem.tasks.task}”

itemClick=”taskSelected(event);” >

<mx:columns>

<mx:DataGridColumn editable=”true”
itemRenderer=”mx.controls.CheckBox” rendererIsEditor=”false”
width=”17″/>

<mx:DataGridColumn headerText=”tasks”
dataField=”task_name”/>

<mx:DataGridColumn headerText=”taskeffort” />

</mx:columns>

</mx:DataGrid>

<mx:ViewStack id=”vs” selectedIndex=”0″ width=”647″
x=”271″>

<mx:Repeater id=”acrep”
dataProvider=”{r.currentItem.tasks.task}” >

<mx:Canvas id=”can” width=”691″ height=”100%” >

<mx:DataGrid id=”act” itemEditEnd=”pro(event)” x=”0″
y=”0″ width=”366″ height=”302″ dataProvider=
“{(ArrayCollection)(totActs.getItemAt(r.currentIndex)).getItemAt(acre p.currentIndex).activity}”
editable=”true”>

<mx:columns>

<mx:DataGridColumn dataField=”sel”
itemRenderer=”selector” editorDataField=”bool” editable=”true”
rendererIsEditor=”true”/>

<mx:DataGridColumn width=”300″ headerText=”Activities”
dataField=”name” editable=”false” />

<mx:DataGridColumn width=”177″ headerText=”Effort”
dataField=”effort” editable=”false” />

</mx:columns>

</mx:DataGrid>

<mx:PieChart id=”pie”
dataProvider=”{(ArrayCollection)(totActs.getItemAt(r.currentIndex)).g etItemAt(acrep.currentIndex).activity}”
x=”374″ width=”248″ height=”250″ y=”29″>

<mx:series>

<mx:PieSeries

field=”effort”

nameField=”name”

labelPosition=”callout”

/>

</mx:series>

</mx:PieChart>

</mx:Canvas>

</mx:Repeater>

</mx:ViewStack>

</mx:Canvas>

</mx:Repeater>

</mx:TabNavigator>|||
is this topic so lame that nobody is willing to comment on
it?? or am i doing it all wrong? if so plz point out.|||
I wanted to take a look at this, but your sample code would
best include everything necessary to reproduce, and at least some
things are left to the imagination, and I don’t have the time to
figure it out. examples are servicelist and

taskSelected, but there is other missing info.

|||
This may not solve it, but a co-worker discovered with a
ComboBox in an DataGrid column the other day that he couldn’t just
mark the DataGridColumn holding the ComboBox as editable=”true”. He
found he had to mark the parent DataGrid as editable=”true”, then
mark all the OTHER DataGridColumn elements (displaying text which
should not be edited) as editable=”false”.

Good luck…

Related posts:

  1. CheckBoxes
  2. DataGrid: row wrap?
  3. When set dataGrid showHeader = false, dataGrid.rowCount then +1, this bug can solve?
  4. Datagrid columns widths
  5. About how to construct dynamic DataGrid

Related posts brought to you by Yet Another Related Posts Plugin.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

   
© 2012 free icons download Suffusion theme by Sayontan Sinha

Featuring Recent Posts WordPress Widget development by YD