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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...