You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by mark goldin <ma...@gmail.com> on 2017/02/13 20:52:24 UTC

Flex 3 datagrid sorting

I have a strange problem with sorting in my datagrid. Its first column is a
name - some string info. when grid comes up this column is marked with a
small number 1. If I start sorting my clicking on an arrow next to this
number the sortCompareFunction function is not executing. But if I click on
some other column first and go back sorting the first column everything is
working fine. Any idea what's wrong?

Thanks

Re: Flex 3 datagrid sorting

Posted by Clint M <cm...@gmail.com>.
can you post a small example of the behavior?
I'm sure someone here could spot the problem

On Mon, Feb 13, 2017 at 2:11 PM, mark goldin <ma...@gmail.com> wrote:

> Not sure what you are saying. All I do is clicking on an arrow icon of the
> first column. It gets sorted using default algorithm meaning not using my
> custom function. After clicking on a header of another column and clicking
> the first column's header again will start using the custom sort function
> of the first column.
>
> Thanks
>
> On Mon, Feb 13, 2017 at 4:07 PM Clint M <cm...@gmail.com> wrote:
>
> > maybe try calling dataProvider.refresh() after applying the sort
> initially
> > or
> > not applying a sort to the base ICollectionView in the first place
> >
> > On Mon, Feb 13, 2017 at 1:40 PM, mark goldin <ma...@gmail.com>
> > wrote:
> >
> > > Also not sure about the example. Like I said if I click on some other
> > > column and then click on the first one, everything is working.
> > >
> > > On Mon, Feb 13, 2017 at 3:33 PM mark goldin <ma...@gmail.com>
> > wrote:
> > >
> > > > No, each column has its own sort function.
> > > >
> > > > On Mon, Feb 13, 2017 at 3:22 PM Clint M <cm...@gmail.com> wrote:
> > > >
> > > > Maybe this example might help?
> > > >
> > > > http://www.jeffryhouser.com/index.cfm/2015/5/1/Why-wont-
> > > my-AdvancedDataGrid-sort-correctly
> > > >
> > > > Are you placing your sortCompare func on the columns on the whole
> grid?
> > > >
> > > > On Mon, Feb 13, 2017 at 12:52 PM, mark goldin <markzolotoy@gmail.com
> >
> > > > wrote:
> > > >
> > > > > I have a strange problem with sorting in my datagrid. Its first
> > column
> > > > is a
> > > > > name - some string info. when grid comes up this column is marked
> > with
> > > a
> > > > > small number 1. If I start sorting my clicking on an arrow next to
> > this
> > > > > number the sortCompareFunction function is not executing. But if I
> > > click
> > > > on
> > > > > some other column first and go back sorting the first column
> > everything
> > > > is
> > > > > working fine. Any idea what's wrong?
> > > > >
> > > > > Thanks
> > > > >
> > > >
> > > >
> > >
> >
>

Re: Flex 3 datagrid sorting

Posted by mark goldin <ma...@gmail.com>.
Not sure what you are saying. All I do is clicking on an arrow icon of the
first column. It gets sorted using default algorithm meaning not using my
custom function. After clicking on a header of another column and clicking
the first column's header again will start using the custom sort function
of the first column.

Thanks

On Mon, Feb 13, 2017 at 4:07 PM Clint M <cm...@gmail.com> wrote:

> maybe try calling dataProvider.refresh() after applying the sort initially
> or
> not applying a sort to the base ICollectionView in the first place
>
> On Mon, Feb 13, 2017 at 1:40 PM, mark goldin <ma...@gmail.com>
> wrote:
>
> > Also not sure about the example. Like I said if I click on some other
> > column and then click on the first one, everything is working.
> >
> > On Mon, Feb 13, 2017 at 3:33 PM mark goldin <ma...@gmail.com>
> wrote:
> >
> > > No, each column has its own sort function.
> > >
> > > On Mon, Feb 13, 2017 at 3:22 PM Clint M <cm...@gmail.com> wrote:
> > >
> > > Maybe this example might help?
> > >
> > > http://www.jeffryhouser.com/index.cfm/2015/5/1/Why-wont-
> > my-AdvancedDataGrid-sort-correctly
> > >
> > > Are you placing your sortCompare func on the columns on the whole grid?
> > >
> > > On Mon, Feb 13, 2017 at 12:52 PM, mark goldin <ma...@gmail.com>
> > > wrote:
> > >
> > > > I have a strange problem with sorting in my datagrid. Its first
> column
> > > is a
> > > > name - some string info. when grid comes up this column is marked
> with
> > a
> > > > small number 1. If I start sorting my clicking on an arrow next to
> this
> > > > number the sortCompareFunction function is not executing. But if I
> > click
> > > on
> > > > some other column first and go back sorting the first column
> everything
> > > is
> > > > working fine. Any idea what's wrong?
> > > >
> > > > Thanks
> > > >
> > >
> > >
> >
>

Re: Flex 3 datagrid sorting

Posted by Clint M <cm...@gmail.com>.
maybe try calling dataProvider.refresh() after applying the sort initially
or
not applying a sort to the base ICollectionView in the first place

On Mon, Feb 13, 2017 at 1:40 PM, mark goldin <ma...@gmail.com> wrote:

> Also not sure about the example. Like I said if I click on some other
> column and then click on the first one, everything is working.
>
> On Mon, Feb 13, 2017 at 3:33 PM mark goldin <ma...@gmail.com> wrote:
>
> > No, each column has its own sort function.
> >
> > On Mon, Feb 13, 2017 at 3:22 PM Clint M <cm...@gmail.com> wrote:
> >
> > Maybe this example might help?
> >
> > http://www.jeffryhouser.com/index.cfm/2015/5/1/Why-wont-
> my-AdvancedDataGrid-sort-correctly
> >
> > Are you placing your sortCompare func on the columns on the whole grid?
> >
> > On Mon, Feb 13, 2017 at 12:52 PM, mark goldin <ma...@gmail.com>
> > wrote:
> >
> > > I have a strange problem with sorting in my datagrid. Its first column
> > is a
> > > name - some string info. when grid comes up this column is marked with
> a
> > > small number 1. If I start sorting my clicking on an arrow next to this
> > > number the sortCompareFunction function is not executing. But if I
> click
> > on
> > > some other column first and go back sorting the first column everything
> > is
> > > working fine. Any idea what's wrong?
> > >
> > > Thanks
> > >
> >
> >
>

Re: Flex 3 datagrid sorting

Posted by mark goldin <ma...@gmail.com>.
Also not sure about the example. Like I said if I click on some other
column and then click on the first one, everything is working.

On Mon, Feb 13, 2017 at 3:33 PM mark goldin <ma...@gmail.com> wrote:

> No, each column has its own sort function.
>
> On Mon, Feb 13, 2017 at 3:22 PM Clint M <cm...@gmail.com> wrote:
>
> Maybe this example might help?
>
> http://www.jeffryhouser.com/index.cfm/2015/5/1/Why-wont-my-AdvancedDataGrid-sort-correctly
>
> Are you placing your sortCompare func on the columns on the whole grid?
>
> On Mon, Feb 13, 2017 at 12:52 PM, mark goldin <ma...@gmail.com>
> wrote:
>
> > I have a strange problem with sorting in my datagrid. Its first column
> is a
> > name - some string info. when grid comes up this column is marked with a
> > small number 1. If I start sorting my clicking on an arrow next to this
> > number the sortCompareFunction function is not executing. But if I click
> on
> > some other column first and go back sorting the first column everything
> is
> > working fine. Any idea what's wrong?
> >
> > Thanks
> >
>
>

Re: Flex 3 datagrid sorting

Posted by mark goldin <ma...@gmail.com>.
No, each column has its own sort function.

On Mon, Feb 13, 2017 at 3:22 PM Clint M <cm...@gmail.com> wrote:

> Maybe this example might help?
>
> http://www.jeffryhouser.com/index.cfm/2015/5/1/Why-wont-my-AdvancedDataGrid-sort-correctly
>
> Are you placing your sortCompare func on the columns on the whole grid?
>
> On Mon, Feb 13, 2017 at 12:52 PM, mark goldin <ma...@gmail.com>
> wrote:
>
> > I have a strange problem with sorting in my datagrid. Its first column
> is a
> > name - some string info. when grid comes up this column is marked with a
> > small number 1. If I start sorting my clicking on an arrow next to this
> > number the sortCompareFunction function is not executing. But if I click
> on
> > some other column first and go back sorting the first column everything
> is
> > working fine. Any idea what's wrong?
> >
> > Thanks
> >
>

Re: Flex 3 datagrid sorting

Posted by Clint M <cm...@gmail.com>.
Maybe this example might help?
http://www.jeffryhouser.com/index.cfm/2015/5/1/Why-wont-my-AdvancedDataGrid-sort-correctly

Are you placing your sortCompare func on the columns on the whole grid?

On Mon, Feb 13, 2017 at 12:52 PM, mark goldin <ma...@gmail.com> wrote:

> I have a strange problem with sorting in my datagrid. Its first column is a
> name - some string info. when grid comes up this column is marked with a
> small number 1. If I start sorting my clicking on an arrow next to this
> number the sortCompareFunction function is not executing. But if I click on
> some other column first and go back sorting the first column everything is
> working fine. Any idea what's wrong?
>
> Thanks
>