flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From OmPrakash Muppirala <bigosma...@gmail.com>
Subject Re: prevent selection of row in DataGrid when checkbox itemrenderer is clicked
Date Fri, 30 Oct 2015 08:08:54 GMT
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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message