How Can i get the KeyPressEventArgs

VE024VE024 Member Posts: 17
Hi All,

In our Navision is it possible to get KeyPressEventArgs. Is there any ocx or automation to get KeyPressEventArgs in C/SIDE.






Thanks,
VE024. :-k

Comments

  • kinekine Member Posts: 12,562
    1) Why you need that? (may be there is another way around)
    2) You can use Automation, but how to catch the event and call trigger in NAV is for separate post or good candidate for searching the forum for "how to create automation with events" for NAV.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • VE024VE024 Member Posts: 17
    Hi Kine,

    I need to get the value in OnAfterInput() Trigger itself, but Our Navision we are getting the value in OnValidate() Trigger Only. Is it possible to get the value in OnAfterInput() Trigger.



    Thanks,
    Naidu. ](*,)
  • kinekine Member Posts: 12,562
    Still, the question is, why you need that...

    In common NAV use you do not need that. It is why I am asking... 8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • VE024VE024 Member Posts: 17
    Hi kine,

    I need to filter the Items in POS. For Example
    when the customer type a letter 'S' into TextBox then the Items automatically filter with starting letter 'S' after that he type letter 'SO' into TextBox then the items filter with starting letter 'SO' like wise... I need to filter.





    Thanks,
    Naidu. ](*,)
  • kinekine Member Posts: 12,562
    Yes, I understand, you need the same functionality like the new lookup in NAV 2009 RTC...

    You can try to use timer for that. It can have side-effects, but try this:

    Add Timer to the form. Into the event of the timer you can add:
    CurrForm.UPDATE(true);
    SetFilters;
    

    the first line will "validate" the value in the editbox. Second one can use the value in the edit box for filtering the table. After that, the editbox will be in "selected" state (all text there will be selected), it means when user will continue in writing, he will overwrite the value. You need to take this into account and solve it somehow (e.g. you can add what he wrote into some variable and use this variable to filter, than you need to add some button which will clear this variable to start new search)

    Take that as hint how to do that, good will be to do that on special form for this purpose...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • garakgarak Member Posts: 3,263
    may be it's the same reason for the question .....

    viewtopic.php?f=23&t=32412

    Regards
    Do you make it right, it works too!
  • VE024VE024 Member Posts: 17
    Hi kine,

    Thanks for the suggestion....







    Thanks,
    Naidu. :-k
Sign In or Register to comment.