I've got inserting records down fine. (See earlier thread.)
Is there an event associated with adding records to a grid? I need to automatically set a couple of fields in the grid whenever the user adds records at the end. How do I trap that?
Some details: the table that the grid is displaying contains the detail lines for a purchase order. It is displayed in line number order. When a record is added, I had tried to assign the line number based on the grid's activerow property but when you add a record, the uninitialized line number is 0 so the grid thinks the record is the first (activerow = 1). I need to assign the line number when adding the record. (One solution could be to have the user input the line number but that doesn't seem satisfactory.)
It seems to me that what I'm looking for is an event associated with adding a record. I could then assign line number based on the number of records in the underlying table.
Suggestions?
TIA,
Shanachie
Is there an event associated with adding records to a grid? I need to automatically set a couple of fields in the grid whenever the user adds records at the end. How do I trap that?
Some details: the table that the grid is displaying contains the detail lines for a purchase order. It is displayed in line number order. When a record is added, I had tried to assign the line number based on the grid's activerow property but when you add a record, the uninitialized line number is 0 so the grid thinks the record is the first (activerow = 1). I need to assign the line number when adding the record. (One solution could be to have the user input the line number but that doesn't seem satisfactory.)
It seems to me that what I'm looking for is an event associated with adding a record. I could then assign line number based on the number of records in the underlying table.
Suggestions?
TIA,
Shanachie