Forum > Packages and Libraries

RXDbGrid not let me edit integer field or column


Hi some body has better ide what going on i create a dbgrid and setting everything but don't let me edit integer f=columns , can edit dates ot boolean colums but on columns with integer value on field don't let me edit  supoust going on edit mode and start to typing and change ... and don't take what i typed..

I using lazarus 2.2.4 on windows 10

I Fixed was my mistake a few time i use direct dataset working with table, because i have serach option on the grid so when type anything goin to search option so all position change and los focus of grid, what i did on search event validate state of dataset...

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TFormUndMinStk.RxDBGPordUsKeyPress(Sender: TObject; var Key: char);Var ColName:String;begin ColName:=RxDBGPordUs.Columns.Items[RxDBGPordUs.SelectedIndex].FieldName; if( RxDBGPordUs.DataSource.DataSet.State = DsBrowse) then begin   if( (key >=#40) and (key <=#125)) then begin     search +=key;       with RxDBGPordUs do begin            RxDBGPordUs.DataSource.DataSet.Locate(ColName,search,[loCaseInsensitive,LoPartialKey]);       end;     key:=#0;   end;   if (key=#27) then  begin     search :='';     with RxDBGPordUs do begin       RXDBGPordUs.DataSource.DataSet.Locate(ColName,search,[loCaseInsensitive,LoPartialKey]);     end;    end;  end;end;  


[0] Message Index

Go to full version