Jump to content

Recommended Posts

Posted

I'm uam difficulty.

When I create dynamic DBGrid if closing the dataset and reopen again.

The column definitions created in runtime are lost and are shown all dataset columns without any previous attributes.

This is a bug?

 

Fields in Dataset (ID,Nome, etc);

 

        with DBGrid.Columns.Add do
        begin
             FieldName := 'id';
             Title.Caption := 'ID';
             Width := 80;
        end;
 
        with DBGrid.Columns.Add do
        begin
             FieldName := 'nome';
             Title.Caption := 'Nome';
             Width := 80;
        end;
 
After closing and opening all columns are shown

 

Posted
I found the problem. If the dataset is opened before dynamically create the grid, the DBGrid assumes the settings of the first opening of the dataset, ignoring subsequent settings.

first created the dbgrid and fixed wireless problem

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