This content has been marked as final. Show 5 replies
"ericbelair" <firstname.lastname@example.org> wrote in message
> How can I access all the itemRenderer instances in a specific
> DataGridColumn? Or, if I have a rowIndex and columnIndex, how can I get
> the itemRenderer at those indices?
What are you trying to accomplish?
I was trying to change the currentState to the default value (null) of all of the other itemRenderers in the column when the currentState in the itemRenderer changes to the non-default value. I found a better way to do this - using a Change Event listener on the listData.owner - but, it still doesn't seem like there should be a public function to access itemRenderers....
An ItemRenderer should only respond to changes of state rather than affecting changes of state.
"Someonewhere" <email@example.com> wrote in message
> An ItemRenderer should only respond to changes of state rather than
> affecting changes of state.
Unless it's also an itemEditor. But I don't think that's what he was trying
to do. He was trying to edit records _other_ than the selected record.
I'm using states to change the display of my itemRenderer from a TextField to a PopUpMenuButton. What I was trying to do was change the display of all other visible itemRenderers in the column back to the TextField, when one of the itemRenderers displays the PopUpMenuButton.
I tried looping through all the itemRenderers in the column and casting them as the class I was using, and then setting the currentState, but, this was not good performance wise, and required too much code. I simplified it by listening for a change event on the listData owner (in my case a DataGrid, but any ListBase component), and setting the currentState back to null when it is triggered. Works like a charm.