x11 Posted May 13, 2020 Share Posted May 13, 2020 Внизу сетки куча свободного места. Можно ли перед пагинатором или после него вставить навигатор? Было бы вообще хорошо, если бы у сети был свой собственный встроенный навигатор. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 13, 2020 Share Posted May 13, 2020 1 minute ago, x11 said: Внизу сетки куча свободного места. Можно ли перед пагинатором или после него вставить навигатор? Было бы вообще хорошо, если бы у сети был свой собственный встроенный навигатор. Да можно, UniDBGrid.PagingBarAuxControl 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted May 13, 2020 Author Share Posted May 13, 2020 А у TUniDBTreeGrіd такого свойства нету Quote Link to comment Share on other sites More sharing options...
x11 Posted May 13, 2020 Author Share Posted May 13, 2020 23 minutes ago, Sherzod said: PagingBarAuxControl Навигатор в этом случае появляется в правом нижнем углу сетки. А как его передвинуть поближе к пагинатору? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 13, 2020 Share Posted May 13, 2020 2 hours ago, x11 said: А как его передвинуть поближе к пагинатору? ОК, я проверю. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 13, 2020 Share Posted May 13, 2020 4 hours ago, x11 said: А как его передвинуть поближе к пагинатору? 1. UniDBGrid1.PagingBarAuxControl = '' 2. procedure TMainForm.UniFormReady(Sender: TObject); begin with UniDBGrid1, UniDBGrid1.JSInterface do if WebOptions.Paged then begin JSCall('pagingBar.add', [JSObject('xtype: "tbseparator"')]); JSCall('pagingBar.add', [UniDBNavigator1.JSControl]); end; end; 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted May 14, 2020 Author Share Posted May 14, 2020 То, что надо, спасибо. 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted May 14, 2020 Author Share Posted May 14, 2020 А как то же самое проделывать с другими компонентами? Например с UniDBTreeGrid. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 14, 2020 Share Posted May 14, 2020 6 minutes ago, x11 said: А как то же самое проделывать с другими компонентами? Например с UniDBTreeGrid. Пожалуйста уточните Ваш вопрос. Quote Link to comment Share on other sites More sharing options...
x11 Posted May 14, 2020 Author Share Posted May 14, 2020 Как встроить навигатор TUniDBNavigator в TUniDBTreeGrid? Чтобы тоже был слева внизу. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 8, 2020 Share Posted October 8, 2020 On 5/14/2020 at 1:07 PM, x11 said: Как встроить навигатор TUniDBNavigator в TUniDBTreeGrid? Я проанализирую. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 8, 2020 Share Posted October 8, 2020 On 5/14/2020 at 1:07 PM, x11 said: Как встроить навигатор TUniDBNavigator в TUniDBTreeGrid? Но с другой стороны, правильно ли использовать навигатор для tree панели!? Quote Link to comment Share on other sites More sharing options...
x11 Posted October 8, 2020 Author Share Posted October 8, 2020 А чем кардинально отличается обычная сетка от древовидной сетки? И там, и там записи - стироки. И там, и там записи - столбцы. И там, и там записи можно редактировать, добавлять, удалять. Что именно вас смутило в tree? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 8, 2020 Share Posted October 8, 2020 2 minutes ago, x11 said: Что именно вас смутило в tree? Навигация. Quote Link to comment Share on other sites More sharing options...
x11 Posted October 8, 2020 Author Share Posted October 8, 2020 в tree нельзя прокручивать записи? Quote Link to comment Share on other sites More sharing options...
x11 Posted October 8, 2020 Author Share Posted October 8, 2020 Ладно, допустим навигацию можно и отключить, а остальной функционал-то может быть полезен... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 8, 2020 Share Posted October 8, 2020 Just now, x11 said: Ладно, допустим навигацию можно и отключить, а остальной функционал-то может быть полезен... OK, я пробую. Quote Link to comment Share on other sites More sharing options...
x11 Posted October 8, 2020 Author Share Posted October 8, 2020 Но навигатор для дерева - не самая большая проблема. Есть много других важных проблем, особенно в мобильной версии uniGUI Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 8, 2020 Share Posted October 8, 2020 On 5/14/2020 at 1:07 PM, x11 said: Как встроить навигатор TUniDBNavigator в TUniDBTreeGrid? Чтобы тоже был слева внизу. В данный момент, это выглядит так: 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 11, 2020 Share Posted October 11, 2020 On 10/8/2020 at 1:31 PM, x11 said: а остальной функционал Еще одно решение, попробуйте... 1. procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniDBTreeGrid1 do begin ClientEvents.UniEvents.Values['beforeInit'] := 'function beforeInit(sender, config){'+ ' config.fbar = ['+ ' {type: "button", text: ''<i class="fas fa-edit"></i> Edit'', '+ ' listeners:'+ ' {click: '+ ' function(){'+ ' if (sender.getSelection()[0] && !sender.getSelection()[0].data.children) {sender.editingPlugin.startEditByPosition('+ ' {column: sender.getSelectionModel().selection.colIdx, row: sender.getSelectionModel().selection.rowIdx})}'+ ' }'+ ' }'+ ' },'+ ' {type: "button", text: ''<i class="fas fa-undo"></i> Cancel'','+ ' listeners: {click: function(){ajaxRequest(sender, "canceledit", [])}}'+ ' },'+ ' {type: "button", text: ''<i class="fas fa-save"></i> Save'','+ ' listeners: {click: function(){ajaxRequest(sender, "saveedit", [])}}'+ ' }'+ ' ]'+ '}'; JSInterface.JSAddListener('boxready', 'function(){'+ ' let fbar = this.down("toolbar");'+ ' if (fbar) {'+ ' fbar.setStyle("border-width", "1px");'+ ' fbar.setStyle("border-top-width", "0px");'+ // Для темы classic ' fbar.setStyle("background-image", "-webkit-linear-gradient(top, #dae7f6, #cddef3 45%, #abc7ec 46%, #abc7ec 50%, #b8cfee 51%, #cbddf3)");'+ ' }'+ '}' ) end; end; 2. procedure TMainForm.UniDBTreeGrid1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if (EventName = 'canceledit')and(Если транзакция активна) then // Отменить, Откатить транзакцию else if (EventName = 'saveedit')and(Если транзакция активна) then // Сохранить, Закоммитить транзакцию end; 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted October 11, 2020 Author Share Posted October 11, 2020 Спасибо. Попробую. 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted December 23, 2020 Author Share Posted December 23, 2020 On 5/13/2020 at 8:55 PM, Sherzod said: JSCall('pagingBar.add', [JSObject('xtype: "tbseparator"')]); В связи с тем, что пагинатор отключается в режиме BufferedStore (бесконечной прокрутки), то подскажите, а как встроить пагинатор в заголовок сетки (HeadetTitle)? Очень желательно в левую часть. Спасибо. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 23, 2020 Share Posted December 23, 2020 2 minutes ago, x11 said: В связи с тем, что пагинатор отключается в режиме BufferedStore (бесконечной прокрутки), то подскажите, а как встроить пагинатор в заголовок сетки (HeadetTitle)? Очень желательно в левую часть. Здравствуйте, UniDBTreeGrid? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 23, 2020 Share Posted December 23, 2020 UniDBGrid? 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted December 23, 2020 Author Share Posted December 23, 2020 да, пока что только для UniDBGrid иртересует 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.