RxDBGrid: fix updown editor in grid cell with null values

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4080 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2015-04-09 12:38:05 +00:00
parent 389c4646f5
commit eff8bcad61

View File

@ -1237,12 +1237,14 @@ begin
begin
if not (F.DataSet.State in dsEditModes) then
F.DataSet.Edit;
if F.IsNull then
F.Value:=0;
F.Value:=F.Value - 1;
Msg.LclMsg.msg:=GM_SETVALUE;
Msg.Grid:=Col.Grid;
{ Msg.Col:=FCol;
Msg.Row:=FRow;}
Msg.Value:=F.DisplayText;
TRxDBGrid(Col.Grid).Editor.Dispatch(Msg);
@ -1263,15 +1265,15 @@ begin
begin
if not (F.DataSet.State in dsEditModes) then
F.DataSet.Edit;
if F.IsNull then
F.Value:=0;
F.Value:=F.Value + 1;
Msg.LclMsg.msg:=GM_SETVALUE;
Msg.Grid:=Col.Grid;
{ Msg.Col:=FCol;
Msg.Row:=FRow;}
Msg.Value:=F.DisplayText;
TRxDBGrid(Col.Grid).Editor.Dispatch(Msg);
end;
end;