Here it is:
<mx:DataGrid id="mygrid" dataProvider="{initDG}" >
<mx:columns>
<mx:DataGridColumn id="grant_year" dataField="grant_year"/>
<mx:DataGridColumn id="cashoutshares" dataField="cashoutshares"
itemRenderer="mx.controls.CheckBox" visible="{!grant_year=='somevalue'
implement ur logic here}"/>
</mx:columns>
</mx:DataGrid
anthony_morsey wrote:
>
> Here is my code:
>
> <mx:DataGrid id="mygrid" dataProvider="{initDG}" >
> <mx:columns>
>
> <mx:DataGridColumn id="grant_year" dataField="grant_year"/>
>
> <mx:DataGridColumn id="cashoutshares" dataField="cashoutshares"
> itemRenderer="mx.controls.CheckBox" />
>
> </mx:columns>
> </mx:DataGrid
>
>
>
> I want to hide the "cashoutshares" column (or turn off the
> itemrenderer in that column) based on the data value of "grant_year".
>
> Thanks
>
>
>
>
>
>
> --- In [email protected], "jmfillman" <[EMAIL PROTECTED]> wrote:
>>
>> Anthony,
>>
>> If you are passing the data from the columns of each row to the
>> itemRenderer, you should be able to set visibility conditions from the
>> itemRenderer.
>>
>> If you post your code, I or someone else here might be able to provide
>> a more specific suggestion.
>>
>> JF
>> --- In [email protected], "anthony_morsey" <tmorsey@> wrote:
>> >
>> > I have a datagrid with multiple columns and rows. One of the columns
>> > contains a checkbox which is rendered with an itemRenderer. I'd like
>> > to conditionally hide some of these checkboxes based on values from
>> > other columns with the same row.
>> >
>> > Any ideas?
>> >
>> > Thanks
>> >
>>
>
>
>
>
--
View this message in context:
http://www.nabble.com/hiding-a-cell-within-a-datagrid-dynamically-tp17673007p17688100.html
Sent from the FlexCoders mailing list archive at Nabble.com.