[Gambas-user] How to sort a TableView?

Gianluigi bagonergi at ...626...
Tue Apr 5 22:46:44 CEST 2016


Lee look what you made a mistake:
(no TableView1 but GridView1)
ValueSorted.Sort(IIf(GridView1.Columns.Ascending, gb.Ascent, gb.Descent))

Ciao
Gianluigi

2016-04-05 20:11 GMT+02:00 T Lee Davidson <t.lee.davidson at ...626...>:

> Yes, I agree since the Mode for String[].Sort is integer and
> GridView.Columns.Ascending is boolean.
>
> But, how about this?
> ValueSorted.Sort(IIf(TableView1.Columns.Ascending, gb.Ascent, gb.Descent))
>
>
> On 04/05/2016 10:17 AM, Gianluigi wrote:
> > Hello Lee,
> > Milio propose this change to avoid the arrows appear upside than sorting.
> > Instead of:
> > ValueSorted.Sort(GridView1.Columns.Ascending)
> > this code:
> > If GridView1.Columns.Ascending Then
> >    ValueSorted.Sort(gb.Ascent)
> > Else
> >    ValueSorted.Sort(gb.Descent)
> > Endif
> > Regards
> > Gianluigi
> >
>
> --
> Lee
> __________
>
> "Artificial Intelligence is no match for natural stupidity."
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list