The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Putting focus on recently added record to custom grid
Posted: 29 Aug 07 10:02 AM
|
I have a datagrid I am launching the 'add' form from the 'onpoupupmenu' event of the grid. I would like to put the focus on the newly added record when the add form closes. Currently the focus remains on whatever field was right clicked on when adding the record. I know I have done this before, but cannot for the life of me find the code..
How do I accomplish this? Thanks |
|
|
|
Re: Putting focus on recently added record to custom grid
Posted: 29 Aug 07 9:28 PM
|
Have you tried selecting it:
Datagrid.Selection.Add "ID of Record"
Keep in mind that for this to work you MUST add the ID column to the Layout (and then make it invisible). Otherwise it will silently fail to select the row.
I just finished writing this into a 6.2.3 environment, and use the code above... |
|
|
|
Re: Putting focus on recently added record to custom grid
Posted: 30 Aug 07 8:06 AM
|
Thanks Raul. It is not working for me for some reason... I am getting the ID of the recently added record fine and have the ID column in the grid.. I kinow I have used this command before also.. very strange. |
|
|
|
Re: Putting focus on recently added record to custom grid
Posted: 30 Aug 07 8:06 AM
|
Thanks Raul. It is not working for me for some reason... I am getting the ID of the recently added record fine and have the ID column in the grid.. I kinow I have used this command before also.. very strange. |
|
|
| |
| |
| |
|