eduardosuruagy Posted October 5, 2018 Share Posted October 5, 2018 How to view or make dbgrid filters invisible in real time? I did a routine for this but when the dbgrid scroll is all to the right side of the video the filters are misaligned. procedure TFrameMasterListener.BtnFilterClick (Sender: TObject); var I: Integer; begin if BtnFiltro.Tag = 0 then begin dbgrid_cadastro2.Columns.BeginUpdate; for I: = 0 to dbgrid_cadastro2.Columns.Count - 1 of if not dbgrid_cadastro2.Columns .Filtering.Enabled then begin if dbgrid_cadastro2.Columns .Tag = 0 then begin dbgrid_cadastro2.Columns .Filtering.Editor: = TUniEdit (Self.FindComponent ('edit _' + dbgrid_cadastro2.Columns.Items .FieldName)); dbgrid_cadastro2.Columns .Filtering.Enabled: = True; end; end; dbgrid_cadastro2.Columns.EndUpdate; BtnFiltro.Tag: = 1; end else if BtnFiltro.Tag = 1 then begin dbgrid_cadastro2.Columns.BeginUpdate; for I: = 0 to dbgrid_cadastro2.Columns.Count - 1 of if dbgrid_cadastro2.Columns .Filtering.Enabled then begin dbgrid_cadastro2.Columns .Filtering.Editor: = nil; dbgrid_cadastro2.Columns .Filtering.Enabled: = False; end; dbgrid_cadastro2.Columns.EndUpdate; if CDCadastro.Active then begin CDCadastro.Filter: = ''; CDCadastro.Filtered: = False; end; BtnFilter.Tag: = 0; end; end; Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 8, 2018 Author Share Posted October 8, 2018 ?? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 8, 2018 Share Posted October 8, 2018 Hello, Which build are you using ?! Have you seen this post ?: Quote Link to comment Share on other sites More sharing options...
benoitclaeys Posted October 9, 2018 Share Posted October 9, 2018 +1 Quote Link to comment Share on other sites More sharing options...
benoitclaeys Posted October 9, 2018 Share Posted October 9, 2018 I add this information : if I create columns and filter fields before showing the form (instead of pushing a button to create them), I do not see the filter fields. Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted October 9, 2018 Author Share Posted October 9, 2018 20 hours ago, Sherzod said: Olá, Qual build você está usando ?! Você viu este post? I'm using the latest version I saw this post and it was because of him that I did my example Quote Link to comment Share on other sites More sharing options...
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.