Jump to content


Photo

NextGrid6: How to add Inplace Editors?


  • Please log in to reply
6 replies to this topic

#1 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 11 April 2021 - 12:10 PM

Hi, Boki:

Trying again to use NextGrid6 since I am creating a new dialog in my large project. 

I needed an NxEdit6, NxDatePicker6 for two columns so that I can use the OnChange Event to trigger a "Save" button enable.

I set them as the Inplace Editor in their respective columns, but when opening the form, the editors are still visible as separate from the associated cells and when editing the cell, no OnChange is fired.

Am I missing something here?

 

I did download the latest update (3/21).

 

Any suggestions, or is this a bug? Should I just go back to NextGrid 5?

 

Thank you,

 

Chuck Belanger



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 11 April 2021 - 08:15 PM

Hello Chuck,

 

Have you maybe forgot to enable Editing for the column that will "accept" new inplace edit?

 

Also, you need to hide the inplace editor from form initially.

 

If this don't help, I can build one very small demo project for you.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 11 April 2021 - 09:53 PM

Thanks, Boki.

But...

The OnChange of the NxEdit6 is not firing at all.

I am expecting that as I type into the editor, this event would fire.

I tried OnClick just to make sure I am in the inplace editor and that works fine.

 

BTW, been 3 years since I really tried to use NextGrid6. I find going back to it to be fairly easy, except for a few minor questions about finding properties,etc. It is more logically organized than NextGrid5 and for some things it works as expected better, faster than NG5.

At some point, I will be revisiting my conversion of my project's NextGrid5 grids again. I figured out it would probably be easier for you if I just present you with something I am trying to accomplish (and did in NG5) and just have you tell me how to do it in NG6.

Chuck



#4 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 11 April 2021 - 10:21 PM

Hi, Boki:

Tried to work around by using OnEnter, OnExit of the NxEdit6. Store the contents in OnEnter then Compare on OnExit, but OnExit is not firing either.

How can I get an OnChange-like event?

Thank you,

Chuck



#5 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 12 April 2021 - 10:27 AM

Hi Chuck,

 

Many of these events are overriden by the grid as grid needs them to detect when to hide inplace-edit or similar.

 

But I have them moved them to the grid. For example, there are OnEditEnter and OnEditExit event that you have now in Grid.

 

I suggest reading this article I wrote:

http://developer.ber...=683&lang=en-us

 

There you can check 

OnInplaceEditChange

 

That is actually OnChange of InplaceEdit.

 

Hope that this helps.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#6 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 13 April 2021 - 12:53 AM

Thank you, Boki!

 

That helps. 

I noticed that the Grid.OnInplaceEditChange does act like OnChange, but how does one differentiate between more than one Inplace Editor in more than one column?

In other words, how do I know if the change is coming from a NxEdit6 vs a NxDatePicker6?

For now this general reaction will work for me since I am mainly interested in knowing if the row I am on has any changes that I then need to save back to the database.

 

Regards,

Chuck



#7 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 14 April 2021 - 06:48 PM

Hi Chuck,

 

You can use one of this 2 properties:

 

NextGrid61.InplaceEdit;

NextGrid61.EditingCell.X; // <--- this one is column being edited
 
Maybe it will be better if I added ACol and ARow in OnInplaceEditChange. I will think about adding it there. It's little bit difficult not to break existing code.

boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users