Jump to content

How to get Editor value of a DBgrid column


KingOrmon

Recommended Posts

Hi,

 

How can I get Editor value of a DBGrid column ?

 

I need to execute this code inside onKeyDown event (when user click return or tab)

 

procedure TMainForm.UniEdit1KeyDown(Sender: TObject; var Key: Word;
 Shift: TShiftState);
begin
 if Key = 13 then
 begin
   ClientDataSet1.Edit;
   ClientDataSet1.FieldByName('LastName').AsString := UniEdit1.Text; // Value is not of gridcolumn.
   ClientDataSet1.FieldByName('City').AsString := 'More......';
   ClientDataSet1.Post;
 end;
end;

Link to comment
Share on other sites

Hi Farshad,

 

Some plans to add ButtonStyle to TUniDBGrid in future releases?

 

It will be great can show an cbsEllipsis in a column.

 

Thanks.

 

Unfortunately it is not possible. Value of a TUniEdit field which acts as a DBGrid editor can't be retrieved in code.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...