leandroavila74 Posted December 21, 2016 Share Posted December 21, 2016 Hi, unimDBGrid.Options.dgTitles setting to False in Delphi IDE Does not work, how can I do not to show? Leandro 1 Link to comment Share on other sites More sharing options...
Sherzod Posted December 21, 2016 Share Posted December 21, 2016 Hi, For now can you try this?!: UnimDBGrid1 -> ClientEvents -> ExtEvents -> Ext.data.Store [store] -> function store.load: function store.load(sender, records, successful, operation, eOpts) { sender.grid.getHeaderContainer().hide(); } Best regards. 1 Link to comment Share on other sites More sharing options...
leandroavila74 Posted December 21, 2016 Author Share Posted December 21, 2016 Hi, For now can you try this?!: UnimDBGrid1 -> ClientEvents -> ExtEvents -> Ext.data.Store [store] -> function store.load: function store.load(sender, records, successful, operation, eOpts) { sender.grid.getHeaderContainer().hide(); } Best regards. worked perfectly thank you so much Delphi Developer Link to comment Share on other sites More sharing options...
x11 Posted December 8, 2020 Share Posted December 8, 2020 On 12/21/2016 at 2:08 PM, Sherzod said: For now can you try this?!: not work for uniGUI 1539 Link to comment Share on other sites More sharing options...
Sherzod Posted December 8, 2020 Share Posted December 8, 2020 2 hours ago, x11 said: not work for uniGUI 1539 The grid has a hideHeaders configuration, but it doesn't seem to work as expected. Link to comment Share on other sites More sharing options...
x11 Posted December 8, 2020 Share Posted December 8, 2020 and? Link to comment Share on other sites More sharing options...
Sherzod Posted December 8, 2020 Share Posted December 8, 2020 2 hours ago, x11 said: Although this works for me. Link to comment Share on other sites More sharing options...
x11 Posted December 8, 2020 Share Posted December 8, 2020 can you attach a test project please? thanx a lot Link to comment Share on other sites More sharing options...
Sherzod Posted December 8, 2020 Share Posted December 8, 2020 17 minutes ago, x11 said: and? Another solution: procedure TMainmForm.UnimFormCreate(Sender: TObject); begin UnimDBGrid1.JSInterface.JSAddListener('painted', 'function(me){me.setHideHeaders(true)}'); end; Link to comment Share on other sites More sharing options...
x11 Posted December 8, 2020 Share Posted December 8, 2020 this code doesn't work for me either Link to comment Share on other sites More sharing options...
Sherzod Posted December 8, 2020 Share Posted December 8, 2020 9 minutes ago, x11 said: this code doesn't work for me either Can you test these solutions with our demo example? Link to comment Share on other sites More sharing options...
x11 Posted December 8, 2020 Share Posted December 8, 2020 ok https://files.dp.ua/ru/sCAGN Link to comment Share on other sites More sharing options...
Sherzod Posted December 8, 2020 Share Posted December 8, 2020 59 minutes ago, x11 said: https://files.dp.ua/ru/sCAGN Then try also this code (Тогда, попробуйте также этот код): procedure TMainmForm.UnimFormCreate(Sender: TObject); begin UnimDBGrid1.JSInterface.JSAddListener('painted', 'function(me){me.getHeaderContainer().hide()}'); end; Link to comment Share on other sites More sharing options...
x11 Posted December 8, 2020 Share Posted December 8, 2020 Yes! Thank you! This code works. 1 Link to comment Share on other sites More sharing options...
x11 Posted December 10, 2020 Share Posted December 10, 2020 when i hide header, i see this Link to comment Share on other sites More sharing options...
Sherzod Posted December 10, 2020 Share Posted December 10, 2020 12 minutes ago, x11 said: when i hide header, i see this At what point? Link to comment Share on other sites More sharing options...
x11 Posted December 10, 2020 Share Posted December 10, 2020 procedure TfmmSelFromRef.UnimFormCreate(Sender: TObject); begin inherited; HideTitleDbGrid(dbgRef);// скрыть заголовок end; hide in FormCreate event and DataSet Open in TUnimEdit.OnChange Link to comment Share on other sites More sharing options...
x11 Posted December 10, 2020 Share Posted December 10, 2020 now i comment line with HideTitleDbGrid(dbgRef); Link to comment Share on other sites More sharing options...
Sherzod Posted December 10, 2020 Share Posted December 10, 2020 1 minute ago, x11 said: hide in FormCreate event Using this code?: On 12/8/2020 at 4:40 PM, Sherzod said: procedure TMainmForm.UnimFormCreate(Sender: TObject); begin UnimDBGrid1.JSInterface.JSAddListener('painted', 'function(me){me.getHeaderContainer().hide()}'); end; Link to comment Share on other sites More sharing options...
x11 Posted December 10, 2020 Share Posted December 10, 2020 procedure HideTitleDbGrid(UnimDBGrid: TUnimDBGrid); begin UnimDBGrid.JSInterface.JSAddListener('painted', 'function(me){me.getHeaderContainer().hide()}');// скрыть заголовок end; Link to comment Share on other sites More sharing options...
Sherzod Posted December 10, 2020 Share Posted December 10, 2020 If possible, please make a simple testcase. (Если есть возможность, попробуйте сделать тестовый случай.) Link to comment Share on other sites More sharing options...
x11 Posted December 10, 2020 Share Posted December 10, 2020 https://files.dp.ua/ru/y3PA8w в архиве: тестовый проект, база DATA.FDB, а так же Firebird 3 Embedd. Используются компоненты FireDAC. Для воспроизведения нажмите на главной форме вверху кнопку. Вот что еще заметил, что если скрыть заголовок, то ширина колонок не такая, как в design-time. Может там и колонок нет? Link to comment Share on other sites More sharing options...
Sherzod Posted December 10, 2020 Share Posted December 10, 2020 1 hour ago, x11 said: https://files.dp.ua/ru/y3PA8w Try this solution: (Попробуйте это решение:) 1. procedure TMainmForm.UnimFormCreate(Sender: TObject); begin //UnimDBGrid1.JSInterface.JSAddListener('painted', 'function(me){me.getHeaderContainer().hide()}');// скрыть заголовок UnimDBGrid1.JSInterface.JSConfig('cls', ['customGrid']); end; 2. CustomCSS .customGrid .x-headercontainer { height: 0; border: none; } 1 Link to comment Share on other sites More sharing options...
x11 Posted December 10, 2020 Share Posted December 10, 2020 1 minute ago, Sherzod said: UnimDBGrid1.JSInterface.JSConfig('cls', ['customGrid']); вместо этой строки кода я могу у сетки указать LayoutConfig.Cls := 'customGrid'; ? Link to comment Share on other sites More sharing options...
Sherzod Posted December 10, 2020 Share Posted December 10, 2020 Just now, x11 said: вместо этой строки кода я могу у сетки указать LayoutConfig.Cls := 'customGrid'; ? Yes. (Да) Link to comment Share on other sites More sharing options...
Recommended Posts