Click to See Complete Forum and Search --> : Re: Sorted Grid Eric ??


Sandra
06-25-2001, 05:53 PM
Hi Eric,
I am using the following code but of no use, Please direct me where to do
the modifications,
Here is the Code :
***************
IF NOT USED('Login')
USE Login IN 0
ENDIF
SELECT Login
SET ORDER TO UserID
ThisForm.Pageframe1.Page1.Grid1.RecordSource = 'Login'

*******
Where 'UserID' is the indexed field.

I am executing this code after adding every user.I am not getting any error
massages but grid does not appear to be sorted.
Any ideas ??

a big thanks in advance

Sandra


"Eric den Doop" <ericdendoop@foxite.com> wrote:
>Hello,
>
>If your table has an index, set the proper order. If not, create an index
on
>the field that you'd like to sort.
>I think there are one or more grid classes on www.universalthread.com that
>allow sorting/indexing on the fly when you click a column header.
>
>--
>Eric den Doop
>www.foxite.com - The Home Of The Visual FoxPro Experts
>
>"Sandra" <sandraibison@hotmail.com> wrote in message
>news:3b3797a0$1@news.devx.com...
>>
>> Hi All,
>> I hv a grid bonded to a table, but i hv to show all the record in sorted
>> order, is there any way??
>> Any ideas will be appreciated.
>>
>> Sandra
>
>

Eric den Doop
06-26-2001, 05:18 AM
Hello Sandra,

I dont see anything that could be wrong, but you dont need to execute the
code everytime you add a new record. Once the order has been set, it will
stay that way, unless you close the table or set a different order. What is
the index expression? Perhaps you have to modify the expression, for example
INDEX ON UPPER(userid) TAG userid.

--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts

"Sandra" <sandraibison@hotmail.com> wrote in message
news:3b37b2e0$1@news.devx.com...
>
> Hi Eric,
> I am using the following code but of no use, Please direct me where to do
> the modifications,
> Here is the Code :
> ***************
> IF NOT USED('Login')
> USE Login IN 0
> ENDIF
> SELECT Login
> SET ORDER TO UserID
> ThisForm.Pageframe1.Page1.Grid1.RecordSource = 'Login'
>
> *******
> Where 'UserID' is the indexed field.
>
> I am executing this code after adding every user.I am not getting any
error
> massages but grid does not appear to be sorted.
> Any ideas ??
>
> a big thanks in advance
>
> Sandra
>
>
> "Eric den Doop" <ericdendoop@foxite.com> wrote:
> >Hello,
> >
> >If your table has an index, set the proper order. If not, create an index
> on
> >the field that you'd like to sort.
> >I think there are one or more grid classes on www.universalthread.com
that
> >allow sorting/indexing on the fly when you click a column header.
> >
> >--
> >Eric den Doop
> >www.foxite.com - The Home Of The Visual FoxPro Experts
> >
> >"Sandra" <sandraibison@hotmail.com> wrote in message
> >news:3b3797a0$1@news.devx.com...
> >>
> >> Hi All,
> >> I hv a grid bonded to a table, but i hv to show all the record in
sorted
> >> order, is there any way??
> >> Any ideas will be appreciated.
> >>
> >> Sandra
> >
> >
>

Tamar E. Granor
06-26-2001, 07:31 AM
On 25 Jun 2001 14:53:36 -0700, "Sandra" <sandraibison@hotmail.com>
wrote:

>I am executing this code after adding every user.I am not getting any error
>massages but grid does not appear to be sorted.
>Any ideas ??
>

When you add a record, you need to refresh the grid (or move the
record pointer) to have the new record appear in the right place.

ThisForm.grdYourGrid.Refresh()

Tamar