Jump to content

Getting value from single selected row?


Trainee

Recommended Posts

Hi,

I have a dynamically created TUniDBGrid.

It contains columns such as: ID, Date, Description.

procedure TSynUniguiGrid.UniDBGridSelectionChange(Sender: TObject);
var
	vRowID: Integer;
begin
    if (sender is TControl) then
    begin
        vRowID :=  TUniDBGrid(Sender).CurrRow;
    end;

    if TUniDBGrid(Sender).SelectedRows.Count > 0 then
    begin
	//
    end;
end;

If I use CurrRow, I get the row number.

 Instead what I want is to just get the value in the ID column of that current row. How does one achieve that? Which demo provides an example?

The ID is needed to create a TDataRequest later on.

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...