Jump to content

uniDBGrid: как выбрать запись программно?


x11

Recommended Posts

Теряется сфокусированная запись. Может какое-то свойство надо включить или отключить?

После переоткрытия набора данных теряется выбранная запись.

procedure TfrdNotes.actOpenUpdateExecute(Sender: TObject);
Var
  id: variant;
begin
  inherited;
  if qData.RecordCount > 1 then
    id := qDataID.Value
  else
    id := null;

  qData.Close;
  qData.ParamByName('ID_USER').AsInteger := UniMainModule.UserData.UserID;
  qData.Open;

  if not VarIsNull(id) then
    if qData.RecordCount > 1 then
      qData.Locate('ID', id, []);
end;

Строка "qData.Locate('ID', id, []);" выполняется.

А что дописать, чтобы в сетке автоматически фокусировалась нужная запись после locate?

Спасибо.

Screenshot_44.jpg

Screenshot_45.jpg

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