Jump to content


Photo

WideString problem v4591


  • Please log in to reply
5 replies to this topic

#1 VrEx

VrEx
  • Members
  • 5 posts

Posted 22 May 2009 - 04:17 PM

Hi, I upgraded component version to 4591, and grid shows only values from TWideStringField. In version 4491 everything was ok.

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 22 May 2009 - 04:37 PM

Hello VrEx,

Open NxDBGrid.pas and locate GetCellInfo procedure. Inside it you will find next code:

CODE
    ctString:
      if not IsNull then
        if not Assigned(OnApplyCell) then
        begin


Replace it completely into:

CODE
    ctString:
      if not IsNull then
        if not Assigned(OnApplyCell) then
        begin
          if DataField.DataType = ftWideString then
{$IFDEF DELPHI2005}
            Result.AsString := DataField.AsWideString
{$ELSE}
            Result.AsString := TWideStringField(DataField).Value
{$ENDIF}
              else Result.AsString := DataField.AsString;
        end;


Please tell me if it works now. I am very sorry for this mistake.

Best regards
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 VrEx

VrEx
  • Members
  • 5 posts

Posted 22 May 2009 - 04:59 PM

Yes, it works.

QUOTE (Boki (Berg) @ May 22 2009, 06:37 PM) <{POST_SNAPBACK}>
Please tell me if it works now. I am very sorry for this mistake.

Best regards


#4 VrEx

VrEx
  • Members
  • 5 posts

Posted 03 June 2009 - 08:32 AM

There is another problem, when TField has implemented event OnGetText, the resulted new value is ignored.

Is this correct solution?

CODE
else Result.AsString := DataField.DisplayText;



QUOTE (Boki (Berg) @ May 22 2009, 06:37 PM) <{POST_SNAPBACK}>
Replace it completely into:

CODE
    ctString:
      if not IsNull then
        if not Assigned(OnApplyCell) then
        begin
          if DataField.DataType = ftWideString then
{$IFDEF DELPHI2005}
            Result.AsString := DataField.AsWideString
{$ELSE}
            Result.AsString := TWideStringField(DataField).Value
{$ENDIF}
              else Result.AsString := DataField.AsString;
        end;


Please tell me if it works now. I am very sorry for this mistake.

Best regards



#5 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 03 June 2009 - 04:22 PM

Hi,

I will test it and then decide. Probably I will apply it.

Best regards
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 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 03 June 2009 - 11:23 PM

Hi,

I have apply this fix. It will be included in next release.

Best regards
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