andyhill Posted August 19, 2020 Share Posted August 19, 2020 I have added a new ComboBox to a DbGrid PagingBar and I want to in code at runtime to be able to:- 1) Clear ComboBox Items 2) Add Multiple ComboBox New Items 3) Read Selected item in Items(ComboBox) via AjaxEvent (_PurchaserItems_) The problem is referencing and adjusting the ComboBox ? My code fragments:- ... ' {'#13#10 + ' xtype: '#39'tbseparator'#39#13#10 + ' },'#13#10 + ' {'#13#10 + ' xtype: '#39'combobox'#39','#13#10 + ' name: '#39'Items'#39','#13#10 + // guess, compiles, no crash ' width: 300,'#13#10 + ' height: 24,'#13#10 + ' tooltip: '#39'Items'#39','#13#10 + ' handler: function() '#13#10 + ' {'#13#10 + ' ajaxRequest(sender, '#39'_PurchaserItems_'#39', []); '#13#10 + ' } '#13#10 + ' },'#13#10 + ' {'#13#10 + ' xtype: '#39'tbseparator'#39#13#10 + ' },'#13#10 + ... procedure TfInvoice.dbGridInvoiceAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin ////////////////////////////////////////////////////////////////////////////// if EventName = '_PurchaserItems_' then begin // Do My Thing end; ... Thanks in advance Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 19, 2020 Share Posted August 19, 2020 3 hours ago, andyhill said: I have added a new ComboBox to a DbGrid PagingBar and I want to in code at runtime to be able to:- 1) Clear ComboBox Items 2) Add Multiple ComboBox New Items 3) Read Selected item in Items(ComboBox) via AjaxEvent (_PurchaserItems_) The problem is referencing and adjusting the ComboBox ? Hi, Sorry, can you please explain in more details what you wanted!? And what problems are you facing? Quote Link to comment Share on other sites More sharing options...
andyhill Posted August 19, 2020 Author Share Posted August 19, 2020 I need to re populate xtype: combobox "Items" outside of pagingbar javascript based on other ajax events. Event A "Items".Clear; "Items".Add "Items".Add "Items".Add Event B "Items".Clear; "Items".Add "Items".Add "Items".Add Event C "Items".Clear; "Items".Add "Items".Add "Items".Add Event D I need to read selected item via ajax event (s:= dbGridInvoice.JSInterface.JSCall('pagingBar.getComponent("Items").getValue', [False]);) or something like that. Quote Link to comment Share on other sites More sharing options...
andyhill Posted August 20, 2020 Author Share Posted August 20, 2020 Please advise Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 20, 2020 Share Posted August 20, 2020 4 hours ago, andyhill said: Please advise Hello Andy, You can simple use the PagingBarAuxControl property of the grid. Quote Link to comment Share on other sites More sharing options...
andyhill Posted August 20, 2020 Author Share Posted August 20, 2020 Please show how to ADD to combobox to paginbar using PagingBarAuxControl then else where how to CLEAR the combobox ITEMS, and how to ADD the combobox ITEMS etc. Quote Link to comment Share on other sites More sharing options...
andyhill Posted August 20, 2020 Author Share Posted August 20, 2020 If I use PagingBarAuxControl then there is only one provision for one object -or- can we use a panel with multiple objects ? Also how do we left align (next to nav buttons) ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 20, 2020 Share Posted August 20, 2020 10 minutes ago, andyhill said: how to ADD to combobox to paginbar using PagingBarAuxControl For example, add as indicated here, and use the capabilities of the standard UniComboBox (you can additionally use triggers). Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 20, 2020 Share Posted August 20, 2020 1 minute ago, andyhill said: can we use a panel with multiple objects ? Yes. Quote Link to comment Share on other sites More sharing options...
andyhill Posted August 20, 2020 Author Share Posted August 20, 2020 Quote Link to comment Share on other sites More sharing options...
mos Posted October 7, 2020 Share Posted October 7, 2020 I have also added a control to the paging bar via PagingBarAuxControl but would like the control to be closer to the other navigation buttons. Is there any way to left align the control so it next to the very last control in the bar? 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.