Jump to content


Photo

Is NextGrid6.Column.OnGetText for each column = NG5.OnEditText?


  • Please log in to reply
1 reply to this topic

#1 BelangerC

BelangerC

    Senior Member

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

Posted 04 June 2023 - 10:52 AM

Hi, Boki:

 

Trying to move the following code to its equivalent event:

 

currently this is in the NextGrid5.OnEditText.

 

I am thinking it now belongs in the NextGrid6.Column.OnGetText.

 

WITH GridView1 DO
  BEGIN
    // if first column of ad hoc row exceeds 512 cc max, then do something
    IF (ACol = 0) AND (Pos('TR', string(Cell[Columns.Count - 1, ARow].AsString))
      > 0) AND (Length(Value) > 512) THEN
    BEGIN
      // 5/23/09
      DoFPShowMessage('Cell Text exceeded max 512 characters.' + CR +
        'Text truncated.', 3000);
       Value := Copy(Value, 1, 512);
    END;
  END;
 
Could you please confirm this is the correct event to put this code? This would apply to Tree and Text Columns.
Thank you,
Chuck Belanger


#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 04 June 2023 - 12:52 PM

Hi,

 

Unfortunately this is not the right event, but I think that it is OnBeforeEdit: 

http://help.bergsoft...les/Edit Events

 

Or, maybe in you case it is OnAcceptEdit.

 

I 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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users