tanu
Active Member
Hi,
I am doing a customized app in our company, and I got a difficulties when I want to fetch a record from a table to the grid, I describe the situation below :
The record in a table :
FieldName0....FieldName1.....FieldName2...... FieldName3
123................Item #1............Size1................30
123................Item #1............Size2................25
123................Item #2............Size1................40
123................Item #3............Size3................30
While we want to display those recrods on the grid like this :
Item Name............Size1......Size2.......Size3
Item #1..................30..........25
Item #2..................40
Item #3..............................................30
The header title of Size is determined by the content of FieldName2
I have tried to do a select then in a while loop do a fetch next, but it seems it just update the row #1 on the grid, I have add
the insert row, with the same result, the row was added but the data just update the grid row #1, so I think I have to know how to move the pointer from one row to the other so after doing an insert row I can do a pointer move to that row then do an update, but the problem is I couldn't find any info how to move from one row to the other, anybody can help me on this ? or maybe there is a better approach ?
The command to move from row to other is also needed when I try to delete (hide) one column because I want to do this :
When the column is deleted (hide) I want all data on that record are deleted (change to 0), I can do that when the content of the grid is just one row, but if more than one when the column is command to reappear the data on the the 1st record is 0 (as expected) but the 2nd and above is still contain the last value (it is not expected).
Thanks in advance for the answer.
Regards,
*** Tanu ***
OneWorld XE SP 18 on W2K
with Oracle 8.1.7 as the db server
I am doing a customized app in our company, and I got a difficulties when I want to fetch a record from a table to the grid, I describe the situation below :
The record in a table :
FieldName0....FieldName1.....FieldName2...... FieldName3
123................Item #1............Size1................30
123................Item #1............Size2................25
123................Item #2............Size1................40
123................Item #3............Size3................30
While we want to display those recrods on the grid like this :
Item Name............Size1......Size2.......Size3
Item #1..................30..........25
Item #2..................40
Item #3..............................................30
The header title of Size is determined by the content of FieldName2
I have tried to do a select then in a while loop do a fetch next, but it seems it just update the row #1 on the grid, I have add
the insert row, with the same result, the row was added but the data just update the grid row #1, so I think I have to know how to move the pointer from one row to the other so after doing an insert row I can do a pointer move to that row then do an update, but the problem is I couldn't find any info how to move from one row to the other, anybody can help me on this ? or maybe there is a better approach ?
The command to move from row to other is also needed when I try to delete (hide) one column because I want to do this :
When the column is deleted (hide) I want all data on that record are deleted (change to 0), I can do that when the content of the grid is just one row, but if more than one when the column is command to reappear the data on the the 1st record is 0 (as expected) but the 2nd and above is still contain the last value (it is not expected).
Thanks in advance for the answer.
Regards,
*** Tanu ***
OneWorld XE SP 18 on W2K
with Oracle 8.1.7 as the db server