im having a problem on showing my datas in a grid control. the scenario is this:
i have a grid control on a form, in which the recordsourcetype is 'alias' and buffermodeoverride = 5. I set it to alias because i want the editing of datas done on some of the columns. so i used a native table to temporarily store the data before i pass it to an sql server database. I also do not issue tableupdate() on the table cause like i said i only use the table for temporary storage, so after i pass it on to the sql server i issue tablerevert() instead. Now the problem arises with the sorting of data. example..
let say customer A, ordered the following items (Item A00001 has a 10+2 promo):
Item No Qty Net Price .....
(1) A00001 10 10.00 .....
(2) A00001 2 0.00 .....
(3) B00001 20 15.00 .....
now let say that salesman decided not to give the promo since customer A is not aware of it. so the data on the grid becomes:
Item No Qty Net Price .....
(1) A00001 10 10.00 .....
(2) B00001 20 15.00 .....
but salesman decided to give the promo again. so the data on the grid becomes:
Item No Qty Net Price .....
(1) A00001 10 10.00 .....
(2) B00001 20 15.00 .....
(3) A00001 2 0.00 .....
the thing is, i want to sort the data by item (ascending) and net price (descending)
now, i cant issue a SELECT .. ORDER BY INTO CURSOR .... since i am using a native table (the temporary table) with buffermodeoverride = 5. it always return an empty cursor (meaning no records).
i also cant issue a SET ORDER TO ... since my table dosent have an index, and if i were to include one, how can i specifically do sorting of data with two fields having 2 separate order on one index.
i also cant change the recordsourcetype of my grid to 4(sql statement) since if i do that, my grid would be on a readonly state, meaning i cant edit some records on the column interactively.
i also cant use a view since i dont have a local database. its a free table.
i hope this informations would help.
thanks a lot.!
i have a grid control on a form, in which the recordsourcetype is 'alias' and buffermodeoverride = 5. I set it to alias because i want the editing of datas done on some of the columns. so i used a native table to temporarily store the data before i pass it to an sql server database. I also do not issue tableupdate() on the table cause like i said i only use the table for temporary storage, so after i pass it on to the sql server i issue tablerevert() instead. Now the problem arises with the sorting of data. example..
let say customer A, ordered the following items (Item A00001 has a 10+2 promo):
Item No Qty Net Price .....
(1) A00001 10 10.00 .....
(2) A00001 2 0.00 .....
(3) B00001 20 15.00 .....
now let say that salesman decided not to give the promo since customer A is not aware of it. so the data on the grid becomes:
Item No Qty Net Price .....
(1) A00001 10 10.00 .....
(2) B00001 20 15.00 .....
but salesman decided to give the promo again. so the data on the grid becomes:
Item No Qty Net Price .....
(1) A00001 10 10.00 .....
(2) B00001 20 15.00 .....
(3) A00001 2 0.00 .....
the thing is, i want to sort the data by item (ascending) and net price (descending)
now, i cant issue a SELECT .. ORDER BY INTO CURSOR .... since i am using a native table (the temporary table) with buffermodeoverride = 5. it always return an empty cursor (meaning no records).
i also cant issue a SET ORDER TO ... since my table dosent have an index, and if i were to include one, how can i specifically do sorting of data with two fields having 2 separate order on one index.
i also cant change the recordsourcetype of my grid to 4(sql statement) since if i do that, my grid would be on a readonly state, meaning i cant edit some records on the column interactively.
i also cant use a view since i dont have a local database. its a free table.
i hope this informations would help.
thanks a lot.!