Board index » delphi » posting data using DBGrid features while there's only one record

posting data using DBGrid features while there's only one record

You could:

1) Post the current record when focus leaves the grid using the grid's
OnExit event.

2) Post the current record when focus leaves the form.

3) Give the user a shortcut key, for example Ctrl+P, to post the
current record

4) Post the current record when the form closes.

On 17 Jun 2002 16:11:29 -0700, "J.Lorec" <j.lo...@bionantes.com>
wrote:

Quote

>Hi,

>Just a miscellaneous problem I encountered while trying to post data using DBGrid features while there's only one record shown.

>eg:
>One record showing one a dbgrid
>Clicking on a field and modifying data inside
>Now how to post data JUST using keys on the keyboard? the data state is still in 'edit' mode (moving thru fields doesn't change anything, it's waiting for data to be posted)

>I used 'OnSetText' field method to automatically post data (field by field) while moving through fields using keys but if there are several records and I try to use key UP or DOWN while editing a field, the application freezes and I have a buffer overflown error.

>Thank you in advance.

>J.Lorec

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
 

Re:posting data using DBGrid features while there's only one record


Hi,

Just a miscellaneous problem I encountered while trying to post data using DBGrid features while there's only one record shown.

eg:
One record showing one a dbgrid
Clicking on a field and modifying data inside
Now how to post data JUST using keys on the keyboard? the data state is still in 'edit' mode (moving thru fields doesn't change anything, it's waiting for data to be posted)

I used 'OnSetText' field method to automatically post data (field by field) while moving through fields using keys but if there are several records and I try to use key UP or DOWN while editing a field, the application freezes and I have a buffer overflown error.

Thank you in advance.

J.Lorec

Re:posting data using DBGrid features while there's only one record


Thank you

Yes of course! onExit seems to fit my needs here; my mind seems a little bit too "clouded" today.

BTW VK_UP or VK_DOWN do the job the same way; didn't check in the VCL sources but it appears to work to right way too.

Quote
Bill Todd <b...@notthis.dbginc.com> wrote:
>You could:

>1) Post the current record when focus leaves the grid using the grid's
>OnExit event.

>2) Post the current record when focus leaves the form.

>3) Give the user a shortcut key, for example Ctrl+P, to post the
>current record

>4) Post the current record when the form closes.

>On 17 Jun 2002 16:11:29 -0700, "J.Lorec" <j.lo...@bionantes.com>
>wrote:

>>Hi,

>>Just a miscellaneous problem I encountered while trying to post data using DBGrid features while there's only one record shown.

>>eg:
>>One record showing one a dbgrid
>>Clicking on a field and modifying data inside
>>Now how to post data JUST using keys on the keyboard? the data state is still in 'edit' mode (moving thru fields doesn't change anything, it's waiting for data to be posted)

>>I used 'OnSetText' field method to automatically post data (field by field) while moving through fields using keys but if there are several records and I try to use key UP or DOWN while editing a field, the application freezes and I have a buffer overflown error.

>>Thank you in advance.

>>J.Lorec

>--
>Bill (TeamB)
>(TeamB cannot respond to questions received via email)

Other Threads