CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Assigned GridCol event fails to fire

by mrcarver » 21 Aug 2017 16:40

CG Gurus:

The attached demo shows the assigned event not firing.

Code: Select all
      // EVENT DOES NOT FIRE
      with lGridCol.EditOptions.DataEvents.Add do
      begin
        EventType    := 'keypress';
        Fn.Condition := 'e.which == 13';
        Fn.OnEvent   := gdEnrolleeAgeJQGridOptionsColModel2EditOptionsDataEvents0Fn;
      end;


Something about the Fn.Condition prevents it from firing. Please Advise.

Monte Carver
mrcarver
 
Posts: 70
Joined: 05 Jun 2012 10:51

by Alexander Bulei » 23 Aug 2017 10:16

Hi mrcarver,

I've tested here and works as expected.

Best Regards.
You do not have the required permissions to view the files attached to this post.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by mrcarver » 23 Aug 2017 15:40

Alexander,

Can you please run the attached demo, and help me understand why the keypress event does not fire?

If you put a break in the event
gdEnrolleeAgeJQGridOptionsColModel2EditOptionsDataEvents0Fn
at line #240 it never fires.

However, commenting line 119 (Fn.Condition := 'e.which==13';) and it fires. Why? What is wrong? Further, the "which" property is not passed in the "AParams" so I cant capture the keycode there either.

The intent is the press of the "enter" key after editing the AGE column, will post the record and put the next row in a EDIT state. But it appears that the "ENTER" event is being absorbed somewhere else.

Perhaps you can recommend an alternate approach?

Please advise.

Monte Carver
You do not have the required permissions to view the files attached to this post.
mrcarver
 
Posts: 70
Joined: 05 Jun 2012 10:51

by Alexander Bulei » 24 Aug 2017 14:06

Hi mrcarver,

Due the internal events and procedures on celEdit, use the 'keydown' event.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to JQGrid

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.