>>My data (Cursor) e.g
>
> No. Date Name Qty
>> 1. 01/02/2000 ABC 12
>> 2. 02/02/2000 NHG 13
>> 3. 04/05/2000 JDHDJ 14
>> 4. 06/05/2000 DAAF 15
>>
>>
>>I want this data displayed in grid in descending order. the data will be eg.
>>
>
> No. Date Name Qty
>> 4. 06/05/2000 DAAF 15
>> 3. 04/05/2000 JDHDJ 14
>> 2. 02/02/2000 NHG 13
>> 1. 01/02/2000 ABC 12
>>
>>So When I append data into the grid, I want the data displayed on the top.
>>Is that possible to do so? I am using VFP5.0a, coding Will be Appreciated.
>>Thanks. Sorry for my english.
>
>First of all, don't think of putting data in the
grid - think of putting data into a cursor that grid uses as it's RecordSource.
>
>So here's one way to do it:
>1) At design time - set the grid.RecordSource = "cu_GridSource"
>2) In the form.Load() put this code
>
SELECT * ;
> FROM mytable ;
> ORDER BY date_field DESC ;
> INTO CURSOR cu_GridSource
>
>That should do it.
Hi Trey,
As I understand Carmen's problem, she wants not only display data, but also update them and still show them in descending order. IOW, she should use Table or view as a record source and just keep it in order. This should do it, I think.
If it's not broken, fix it until it is.
My Blog