flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Dahmen <fr...@dahmenia.de>
Subject Re: prevent selection of row in DataGrid when checkbox itemrenderer is clicked
Date Fri, 30 Oct 2015 08:36:05 GMT
thanks Om,
another attempt in english:
when I click on  / select a row, another view (based on the row's data) 
is shown
but each row has a one column with a checkbox
when i click this column different code should run (not showing the 
other view)

Unfortunately the GridSelectionEvent does not indicate which column was 
clicked,
so I can't catch the checkbox-click in the selectionchangehandler



Am 30.10.2015 um 09:08 schrieb OmPrakash Muppirala:
> For Spark DataGrid, this is what I do:
>
> selectionMode="{GridSelectionMode.NONE}" caretIndicator="{null}"
> selectionIndicator="{null}"
> selectionChanging="dataGrid_selectionChangingHandler(event)"
>
> protected function
> dataGrid_selectionChangingHandler(event:GridSelectionEvent):void
> {
>    event.preventDefault();
> }
>
> I have a column with a checkbox which indicates if the row is selected or
> not.  You might have to modify it a little bit to suit your case.
>
> Hope this helps.
>
> Thanks,
> Om
>
> On Fri, Oct 30, 2015 at 12:50 AM, Frank Dahmen <frank@dahmenia.de> wrote:
>
>> Also, the row may get the selected background, but i want to prevent the
>> selectionchange event
>> or catch that the checkbox was clicked in the selectionchangehandler
>>
>>
>>
>> Am 30.10.2015 um 08:26 schrieb Marcus Fritze:
>>
>>> In the itemrenderer of the datagrid set autodrawbackground="false"
>>>
>>> Marcus Fritze
>>>
>>> Am 30.10.2015 um 07:45 schrieb Frank Dahmen <frank@dahmenia.de>:
>>>> I have a datagrid with selectable rows
>>>> (  selectionChange="gridSelectionChangeHandler(event)"  )
>>>> one column has a checkbox itemrenderer
>>>> how can I prevent the selection when I click the checkbox?
>>>>
>>>> Thanks
>>>>
>>>>


Mime
View raw message