Jump to content

Unidbgrid and ClientDataset


grib

Recommended Posts

I have tested UniDBGrid connected with TClientDataset. I need to refresh some arbitrary rows without scrolling UniDBGrid:

 

  with ClientDataSet do

  begin
    iIndex := RecNo;
    DisableControls;
    try
      First;
      while not EOF do
      begin
        Edit;
        for cb2 := 0 to FieldCount - 1 do
          Fields[cb2].AsWideString := 'New' + cb2.ToString;
        Post;
        Next;
      end;
    finally
      EnableControls;
    end;
    RecNo := iIndex;
  end;

 

After execution this code the UniDBGrid is not updated. Shouldn't I use DisableControls? It works good even without it

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