Jump to content


Photo

NumberColumn only Integer


  • Please log in to reply
4 replies to this topic

#1 MasterEvil

MasterEvil
  • Members
  • 104 posts
  • Location:Germany

Posted 06 March 2007 - 09:50 PM

Hello Boki,

I thought this was an easy task, but it seems it's not possible (or I'm too stupid):
I want a NumberColumn, which only let the user input integer values, no float (0.1 or 0,23), just integer (0,1,2,3,...).
But I want to use the SpinEdit. The FormatMask is not useful for me, because the user can still input float values and the saved value is also still the float value.

Is this not possible?

greetz
Steffen

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 07 March 2007 - 04:08 PM

Hello Steffen,

I will add now EditOptions property inside Column. Until then, please use next code:

CODE
procedure TForm1.NextGrid1BeforeEdit(Sender: TObject; ACol, ARow: Integer;
  var Accept: Boolean);
begin
  if ACol = 0 then
  begin
    TNxSpinEdit(NextGrid1.Columns[0].Editor).Options := [];
  end;
end;


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 MasterEvil

MasterEvil
  • Members
  • 104 posts
  • Location:Germany

Posted 07 March 2007 - 09:37 PM

Hello Boki,

thx, that worked! smile.gif

greetz,
Steffen

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 07 March 2007 - 10:22 PM

Hello,

In new release there will be a option EditOptions for such purpose.

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.

#5 MasterEvil

MasterEvil
  • Members
  • 104 posts
  • Location:Germany

Posted 11 March 2007 - 01:17 PM

Thanks Boki! That'll make it easier.

greetz
Steffen




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users