herculanojs Posted May 11, 2016 Posted May 11, 2016 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 Quote
Sherzod Posted May 11, 2016 Posted May 11, 2016 Hi, Pls, can you make a small test case ?! Best regards. Quote
herculanojs Posted May 11, 2016 Author Posted May 11, 2016 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.